Skip to contentSkip to conversation

drm/udl: limit modes to the sku pixel limits.

PATCH In review Dave Airlie 2 participants 2 messages Sep 25, 2012

Subsystems (3)
lore
Share & tools
lore

Dave Airlie

author maintainer
#0 lore raw

PATCH 1/1 drm/udl: limit modes to the sku pixel limits.

From: Dave Airlie <[email protected]>

Otherwise when X starts we commonly get a black screen scanning out nothing, its wierd dpms on/off from userspace brings it back,

With this on F18, multi-seat works again with my 1920x1200 monitor which is above the sku limit for the device I have.

---
 drivers/gpu/drm/udl/udl_connector.c | 7 +++++++
 1 file changed, 7 insertions(+)
drivers/gpu/drm/udl/udl_connector.c +7 -0
index ba055e9..8d9dc44 100644
@@ -69,6 +69,13 @@ static int udl_get_modes(struct drm_connector *connector)
 static int udl_mode_valid(struct drm_connector *connector,
 			  struct drm_display_mode *mode)
 {
+	struct udl_device *udl = connector->dev->dev_private;
+	if (!udl->sku_pixel_limit)
+		return 0;
+
+	if (mode->vdisplay * mode->hdisplay > udl->sku_pixel_limit)
+		return MODE_VIRTUAL_Y;
+
 	return 0;
 }
 
Signature · 1 line
1.7.12
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Dave Airlie

From: Dave Airlie <[email protected]>

Otherwise when X starts we commonly get a black screen scanning out nothing, its wierd dpms on/off from userspace brings it back,

With this on F18, multi-seat works again with my 1920x1200 monitor which is above the sku limit for the device I have.

I'm not familiar with the hw, but looks reasonable.

Quoted 29 lines
---
 drivers/gpu/drm/udl/udl_connector.c | 7 +++++++
 1 file changed, 7 insertions(+)
drivers/gpu/drm/udl/udl_connector.c +7 -1
index ba055e9..8d9dc44 100644
@@ -69,6 +69,13 @@ static int udl_get_modes(struct drm_connector *connector)
 static int udl_mode_valid(struct drm_connector *connector,
                          struct drm_display_mode *mode)
 {
+       struct udl_device *udl = connector->dev->dev_private;
+       if (!udl->sku_pixel_limit)
+               return 0;
+
+       if (mode->vdisplay * mode->hdisplay > udl->sku_pixel_limit)
+               return MODE_VIRTUAL_Y;
+
        return 0;
 }
 
--

1.7.12

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel