Skip to content

Commit

Permalink
drm/radeon/kms: make sure LVDS panel is valid in detect()
Browse files Browse the repository at this point in the history
If the panel data is bogus this can lead to problems
later when the hardware trys to set the mode.  If the
data is invalid, report LVDS as disconnected.

Should fix fdo bug 24247.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
Alex Deucher authored and Dave Airlie committed Oct 12, 2009
1 parent b5fc901 commit 2ffb842
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion drivers/gpu/drm/radeon/radeon_connectors.c
Original file line number Diff line number Diff line change
Expand Up @@ -415,8 +415,20 @@ static int radeon_lvds_mode_valid(struct drm_connector *connector,

static enum drm_connector_status radeon_lvds_detect(struct drm_connector *connector)
{
enum drm_connector_status ret = connector_status_connected;
enum drm_connector_status ret = connector_status_disconnected;
struct drm_encoder *encoder = radeon_best_single_encoder(connector);

if (encoder) {
struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder);
struct radeon_native_mode *native_mode = &radeon_encoder->native_mode;

/* check if panel is valid */
if (native_mode->panel_xres >= 320 && native_mode->panel_yres >= 240)
ret = connector_status_connected;

}
/* check acpi lid status ??? */

radeon_connector_update_scratch_regs(connector, ret);
return ret;
}
Expand Down

0 comments on commit 2ffb842

Please sign in to comment.