On Mon, Oct 12, 2009 at 1:16 AM, Dave Airlie <airl...@linux.ie> wrote:
>> 1 - make sure lvds panels have valid native mode info. if not, report
>> lvds as disconnected
>> 2 - fix up crtc dpms ordering based on recommendation from bios docs
>> 3 - add support for AdjustDisplayPll table which is used to adjust the
>> clock to meet special requirements of different encoders (e.g.,
>> tv-out, DP, certain low dot clocks on tmds, etc.)
>> 4. clean up the crtc mode set path
>> 5. switch lvds to use the drm_mode struct rather than the
>> radeon_native_mode struct. Eliminates a layer of indirection.
>
> drm_mode structs are objects with identifiers, I think you aren't doing
> this right, use * to the mode strcut, create a native mode one using
> drm_mode_create and don't overwrite the mode id stuff.
>
I think this patch should do the trick.
Alex
> Dave.
>
> >
>> Patch 5 could probably use some more testing to make sure I didn't
>> accidentally break lvds on any picky panels due to a typo in the
>> conversion.
>>
>> Alex
>>
>
From ccef8b311a1b9345cb99177a2cf2c37e5667622b Mon Sep 17 00:00:00 2001
From: Alex Deucher <alexdeuc...@gmail.com>
Date: Mon, 12 Oct 2009 11:25:05 -0400
Subject: [PATCH] drm/radeon/kms: properly handle mode id with native mode changes
drm modes are objects with indentifiers. Make sure to preserve
the mode id when copying mode params.
Signed-off-by: Alex Deucher <alexdeuc...@gmail.com>
---
drivers/gpu/drm/radeon/radeon_connectors.c | 3 +--
drivers/gpu/drm/radeon/radeon_encoders.c | 2 ++
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c
index 17d5659..729207a 100644
--- a/drivers/gpu/drm/radeon/radeon_connectors.c
+++ b/drivers/gpu/drm/radeon/radeon_connectors.c
@@ -183,8 +183,7 @@ static struct drm_display_mode *radeon_fp_native_mode(struct drm_encoder *encode
if (native_mode->hdisplay != 0 &&
native_mode->vdisplay != 0 &&
native_mode->clock != 0) {
- mode = drm_mode_create(dev);
- *mode = *native_mode;
+ mode = drm_mode_duplicate(dev, native_mode);
mode->type = DRM_MODE_TYPE_PREFERRED | DRM_MODE_TYPE_DRIVER;
drm_mode_set_name(mode);
diff --git a/drivers/gpu/drm/radeon/radeon_encoders.c b/drivers/gpu/drm/radeon/radeon_encoders.c
index a9d4e0a..10845f3 100644
--- a/drivers/gpu/drm/radeon/radeon_encoders.c
+++ b/drivers/gpu/drm/radeon/radeon_encoders.c
@@ -175,11 +175,13 @@ void radeon_rmx_mode_fixup(struct drm_encoder *encoder,
if (mode->hdisplay < native_mode->hdisplay ||
mode->vdisplay < native_mode->vdisplay) {
+ int mode_id = adjusted_mode->base.id;
*adjusted_mode = *native_mode;
if (!ASIC_IS_AVIVO(rdev)) {
adjusted_mode->hdisplay = mode->hdisplay;
adjusted_mode->vdisplay = mode->vdisplay;
}
+ adjusted_mode->base.id = mode_id;
}
}
--
1.5.6.3
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel