[PATCH 2/2] drm/crtc-helper: don't disable disconnected outputs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is the equivalent change in the crtc helpers as done to the i915
modeset infrastructure in

commit b0a2658acb5bf9ca86b4aab011b7106de3af0add
Author: Daniel Vetter <daniel.vetter@xxxxxxxx>
Date:   Tue Dec 18 09:37:54 2012 +0100

    drm/i915: don't disable disconnected outputs

This was originally introduced to make encoder sharing on radone
easier for userspace, but:

- It is policy and as such belongs into userspace. E.g. personally I'm
  fairly annoyed that a flaky cable results in permanent changes of
  the desktop layout, so I'll kick out DEs which do this. Worse if the
  kernel also tries to be clever.

- It's inconsistent: We only kill disconnected outputs on setCrtc
  (which userspace might also call when just changing the
  framebuffer), but not when e.g. we receive a hpd event or in the
  output poll worker.

- It's unexpected behaviour for the userspace driver, at least in the
  intel ddx we've had tons of bugs where the driver fell over and
  killed the X session becuase pageflips/vblanks suddenly stopped
  working. We've had to fix this by wrapping every single setCrtc int
  a big "recover kms state from the kernel again" operation.

- It's suprising for the kernel, too: It took a few mails between Rob,
  Matt and me for them to notice that little dragon wreaking havoc
  with the universal plane framebuffer refcounting.

- Userspace can cope with it and e.g. Gnome already kills disconnected
  outputs and reconfigures the desktop automatically. And since there
  have been no regression reports for the i915 change from over 1 year
  ago I think all other DEs are also ready.

Note that the lines removed in this patch go back to

commit a3a0544b2c84e1d7a2022b558ecf66d8c6a8dd93
Author: Dave Airlie <airlied@xxxxxxxxxx>
Date:   Mon Aug 31 15:16:30 2009 +1000

    drm/kms: add explicit encoder disable function and detach harder.

Unfortunately the patch itself doesn't explain a hole lot about why it
was added ...

Cc: Matt Roper <matthew.d.roper@xxxxxxxxx>
Cc: Rob Clark <robdclark@xxxxxxxxx>
Cc: Dave Airlie <airlied@xxxxxxxxxx>
Cc: Alex Deucher <alexdeucher@xxxxxxxxx>
Signed-off-by: Daniel Vetter <daniel.vetter@xxxxxxxx>
---
 drivers/gpu/drm/drm_crtc_helper.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c
index 8108db95e12b..003924025aa7 100644
--- a/drivers/gpu/drm/drm_crtc_helper.c
+++ b/drivers/gpu/drm/drm_crtc_helper.c
@@ -289,8 +289,6 @@ static void __drm_helper_disable_unused_functions(struct drm_device *dev)
 	list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
 		if (!connector->encoder)
 			continue;
-		if (connector->status == connector_status_disconnected)
-			connector->encoder = NULL;
 	}
 
 	list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) {
-- 
1.8.5.2

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux