Re: [PATCH] drm/radeon/kms: fix legacy LVDS mode computation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Apr 30, 2010 at 6:08 AM, Jerome Glisse <jglisse@xxxxxxxxxx> wrote:
> From: John Doe <glisse@xxxxxxxxxxxxxxx>
>
> Compute downscaled mode timing like DDX does on legacy hw.
> With this patch it's now possible to use non native laptop
> panel resolution. Tested on M7 (7500) laptop.

I think I just had the logic reversed previously.  Does the attached
patch also fix the issue?  It should fix the avivo scaling problems
that were reported as well.

Alex


>
> Cc: <stable@xxxxxxxxxx>
> Signed-off-by: Jerome Glisse <jglisse@xxxxxxxxxx>
> ---
>  drivers/gpu/drm/radeon/radeon_legacy_encoders.c |   23 ++++++++++++++++++++++-
>  1 files changed, 22 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c
> index 2441cca..0d78f5b 100644
> --- a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c
> +++ b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c
> @@ -219,6 +219,8 @@ static bool radeon_legacy_mode_fixup(struct drm_encoder *encoder,
>        struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder);
>        struct drm_device *dev = encoder->dev;
>        struct radeon_device *rdev = dev->dev_private;
> +       unsigned hsync_width, vsync_width;
> +       unsigned hover, vover, hblank, vblank;
>
>        /* adjust pm to upcoming mode change */
>        radeon_pm_compute_clocks(rdev);
> @@ -237,8 +239,27 @@ static bool radeon_legacy_mode_fixup(struct drm_encoder *encoder,
>                adjusted_mode->crtc_hdisplay = mode->hdisplay;
>                adjusted_mode->crtc_vdisplay = mode->vdisplay;
>                adjusted_mode->base.id = mode_id;
> +               hblank = native_mode->htotal - native_mode->hdisplay;
> +               vblank = native_mode->vtotal - native_mode->vdisplay;
> +               hover = native_mode->hsync_start - native_mode->hdisplay;
> +               vover = native_mode->vsync_start - native_mode->vdisplay;
> +               hsync_width = native_mode->hsync_end - native_mode->hsync_start;
> +               vsync_width = native_mode->vsync_end - native_mode->vsync_start;
> +               adjusted_mode->crtc_hsync_start = mode->hdisplay + hover;
> +               adjusted_mode->crtc_hsync_end = adjusted_mode->crtc_hsync_start + hsync_width;
> +               adjusted_mode->crtc_htotal = mode->hdisplay + hblank;
> +               adjusted_mode->crtc_vsync_start = mode->vdisplay + vover;
> +               adjusted_mode->crtc_vsync_end = adjusted_mode->crtc_vsync_start + vsync_width;
> +               adjusted_mode->crtc_vtotal = mode->vdisplay + vblank;
> +               adjusted_mode->crtc_hblank_start = mode->hdisplay;
> +               adjusted_mode->crtc_vblank_start = mode->vdisplay;
> +               adjusted_mode->hsync_start = adjusted_mode->crtc_hsync_start;
> +               adjusted_mode->hsync_end = adjusted_mode->crtc_hsync_end;
> +               adjusted_mode->htotal = adjusted_mode->crtc_htotal;
> +               adjusted_mode->vsync_start = adjusted_mode->crtc_vsync_start;
> +               adjusted_mode->vsync_end = adjusted_mode->crtc_vsync_end;
> +               adjusted_mode->vtotal = adjusted_mode->crtc_vtotal;
>        }
> -
>        return true;
>  }
>
> --
> 1.7.0.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@xxxxxxxxxxxxxxxxxxxxx
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>

Attachment: 0001-drm-radeon-kms-fix-reversed-logic-in-panel-scaling.patch
Description: application/mbox

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux