All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michel Dänzer" <michel@daenzer.net>
To: Alex Deucher <alexdeucher@gmail.com>
Cc: DRI Development Mailing List <dri-devel@lists.sourceforge.net>
Subject: Re: [PATCH] drm/radeon/kms: fix up LVDS handling on macs
Date: Tue, 12 Jan 2010 09:49:11 +0100	[thread overview]
Message-ID: <1263286151.3541.142.camel@thor> (raw)
In-Reply-To: <a728f9f91001110810pe15c23are306380e5a3c4acf@mail.gmail.com>

On Mon, 2010-01-11 at 11:10 -0500, Alex Deucher wrote: 
> >From 16de3600adde106fbb6eb828a3fa1b935d938425 Mon Sep 17 00:00:00 2001
> From: Alex Deucher <alexdeucher@gmail.com>
> Date: Mon, 11 Jan 2010 10:50:18 -0500
> Subject: [PATCH] drm/radeon/kms: fix up LVDS handling on macs
> 
> Based on radeonfb code and recent ddx fix.
> 
> Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
> ---
>  drivers/gpu/drm/radeon/radeon_legacy_encoders.c |   24 +++++++++++++++++++++-
>  1 files changed, 22 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c
> b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c
> index 981508f..f746560 100644
> --- a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c
> +++ b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c
> @@ -85,8 +97,16 @@ static void radeon_legacy_lvds_dpms(struct
> drm_encoder *encoder, int mode)
>  		WREG32_PLL_P(RADEON_PIXCLKS_CNTL, 0, ~RADEON_PIXCLK_LVDS_ALWAYS_ONb);
>  		lvds_gen_cntl = RREG32(RADEON_LVDS_GEN_CNTL);
>  		lvds_gen_cntl |= RADEON_LVDS_DISPLAY_DIS;
> -		lvds_gen_cntl &= ~(RADEON_LVDS_ON | RADEON_LVDS_BLON |
> RADEON_LVDS_EN | RADEON_LVDS_DIGON);
> -		udelay(panel_pwr_delay * 1000);
> +		if (is_mac) {
> +			lvds_gen_cntl &= ~RADEON_LVDS_BL_MOD_EN;
> +			WREG32(RADEON_LVDS_GEN_CNTL, lvds_gen_cntl);
> +			udelay(panel_pwr_delay * 1000);
> +			lvds_gen_cntl &= ~(RADEON_LVDS_ON | RADEON_LVDS_EN);
> +		} else {
> +			WREG32(RADEON_LVDS_GEN_CNTL, lvds_gen_cntl);
> +			lvds_gen_cntl &= ~(RADEON_LVDS_ON | RADEON_LVDS_BLON |
> RADEON_LVDS_EN | RADEON_LVDS_DIGON);
> +			udelay(panel_pwr_delay * 1000);
> +		}
>  		WREG32(RADEON_LVDS_GEN_CNTL, lvds_gen_cntl);
>  		WREG32_PLL(RADEON_PIXCLKS_CNTL, pixclks_cntl);
>  		break;

Minor niggle here: You could leave a single udelay() after the if
(is_mac) blocks.

Other than that,

Reviewed-by: Michel Dänzer <michel@daenzer.net>
Tested-by: Michel Dänzer <michel@daenzer.net>


-- 
Earthling Michel Dänzer           |                http://www.vmware.com
Libre software enthusiast         |          Debian, X and DRI developer

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

  reply	other threads:[~2010-01-12  8:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-11 16:10 [PATCH] drm/radeon/kms: fix up LVDS handling on macs Alex Deucher
2010-01-12  8:49 ` Michel Dänzer [this message]
2010-01-12 16:20   ` Alex Deucher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1263286151.3541.142.camel@thor \
    --to=michel@daenzer.net \
    --cc=alexdeucher@gmail.com \
    --cc=dri-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.