A couple more patches to fix up some issues with tv-out.
Alex
On Fri, Oct 9, 2009 at 6:45 PM, Alex Deucher <alexdeuc...@gmail.com> wrote:
> One more patch to address a possible case of systems with bad native
> mode info for lvds, but a valid edid.
>
> Alex
>
> On Fri, Oct 9, 2009 at 5:53 PM, Alex Deucher <alexdeuc...@gmail.com> wrote:
>> Attached are some updates to radeon kms; mostly clean-ups I ran into
>> while preparing for evergreen support.
>>
>> patches:
>> 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.
>>
>> 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 a2b15dcfdc3735c1e16cbad3ba27618902f9cf76 Mon Sep 17 00:00:00 2001
From: Alex Deucher <alexdeuc...@gmail.com>
Date: Tue, 13 Oct 2009 23:57:47 -0400
Subject: [PATCH] drm/radeon/kms/atom: fix tv-out
D1MODE_INTERLEAVE_EN was getting set in some cases
in the encoder quirks function due to the changes in
5a9bcacc0a56f0d9577494e834519480018a6cc3
Signed-off-by: Alex Deucher <alexdeuc...@gmail.com>
---
drivers/gpu/drm/radeon/atombios_crtc.c | 4 ----
drivers/gpu/drm/radeon/radeon_encoders.c | 9 ++++++---
2 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/radeon/atombios_crtc.c b/drivers/gpu/drm/radeon/atombios_crtc.c
index 3409aa3..f7dcb69 100644
--- a/drivers/gpu/drm/radeon/atombios_crtc.c
+++ b/drivers/gpu/drm/radeon/atombios_crtc.c
@@ -31,10 +31,6 @@
#include "atom.h"
#include "atom-bits.h"
-/* evil but including atombios.h is much worse */
-bool radeon_atom_get_tv_timings(struct radeon_device *rdev, int index,
- SET_CRTC_TIMING_PARAMETERS_PS_ALLOCATION *crtc_timing,
- int32_t *pixel_clock);
static void atombios_overscan_setup(struct drm_crtc *crtc,
struct drm_display_mode *mode,
struct drm_display_mode *adjusted_mode)
diff --git a/drivers/gpu/drm/radeon/radeon_encoders.c b/drivers/gpu/drm/radeon/radeon_encoders.c
index 10845f3..96a830a 100644
--- a/drivers/gpu/drm/radeon/radeon_encoders.c
+++ b/drivers/gpu/drm/radeon/radeon_encoders.c
@@ -204,7 +204,7 @@ static bool radeon_atom_mode_fixup(struct drm_encoder *encoder,
&& (mode->crtc_vsync_start < (mode->crtc_vdisplay + 2)))
adjusted_mode->crtc_vsync_start = adjusted_mode->crtc_vdisplay + 2;
- if (radeon_encoder->active_device & ATOM_DEVICE_TV_SUPPORT) {
+ if (radeon_encoder->active_device & (ATOM_DEVICE_TV_SUPPORT)) {
struct radeon_encoder_atom_dac *tv_dac = radeon_encoder->enc_priv;
if (tv_dac) {
if (tv_dac->tv_std == TV_STD_NTSC ||
@@ -1090,8 +1090,11 @@ atombios_apply_encoder_quirks(struct drm_encoder *encoder,
}
/* set scaler clears this on some chips */
- if (ASIC_IS_AVIVO(rdev) && (mode->flags & DRM_MODE_FLAG_INTERLACE))
- WREG32(AVIVO_D1MODE_DATA_FORMAT + radeon_crtc->crtc_offset, AVIVO_D1MODE_INTERLEAVE_EN);
+ if (!(radeon_encoder->active_device & (ATOM_DEVICE_TV_SUPPORT))) {
+ if (ASIC_IS_AVIVO(rdev) && (mode->flags & DRM_MODE_FLAG_INTERLACE))
+ WREG32(AVIVO_D1MODE_DATA_FORMAT + radeon_crtc->crtc_offset,
+ AVIVO_D1MODE_INTERLEAVE_EN);
+ }
}
static void
--
1.5.6.3
From ca8fb7e3f062285c5b4ca22bb731cb745cc182a9 Mon Sep 17 00:00:00 2001
From: Alex Deucher <alexdeuc...@gmail.com>
Date: Tue, 13 Oct 2009 12:48:44 -0400
Subject: [PATCH] drm/radeon/kms: limit default tv modes to <= 1024x768
fixes fdo bug 24496
Signed-off-by: Alex Deucher <alexdeuc...@gmail.com>
---
drivers/gpu/drm/radeon/radeon_connectors.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c
index 729207a..ae47f25 100644
--- a/drivers/gpu/drm/radeon/radeon_connectors.c
+++ b/drivers/gpu/drm/radeon/radeon_connectors.c
@@ -223,6 +223,11 @@ static void radeon_add_common_modes(struct drm_encoder *encoder, struct drm_conn
};
for (i = 0; i < 17; i++) {
+ if (radeon_encoder->devices & (ATOM_DEVICE_TV_SUPPORT)) {
+ if (common_modes[i].w > 1024 ||
+ common_modes[i].h > 768)
+ continue;
+ }
if (radeon_encoder->devices & (ATOM_DEVICE_LCD_SUPPORT)) {
if (common_modes[i].w > native_mode->hdisplay ||
common_modes[i].h > native_mode->vdisplay ||
--
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