Re: [PATCH] drm/radeon/kms: fix extended lvds info parsing

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

 



On Wed, May 11, 2011 at 2:02 PM, Alex Deucher <alexdeucher@xxxxxxxxx> wrote:
> On rev <= 1.1 tables, the offset is absolute,
> on newer tables, it's relative.
>
> Fixes:
> https://bugzilla.redhat.com/show_bug.cgi?id=700326
>
> Signed-off-by: Alex Deucher <alexdeucher@xxxxxxxxx>
> Cc: stable@xxxxxxxxxx
Reviewed-by: Jerome Glisse <jglisse@xxxxxxxxxx>

> ---
>  drivers/gpu/drm/radeon/radeon_atombios.c |   14 +++++++++++---
>  1 files changed, 11 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c
> index 7615aaa..fd6f4f3 100644
> --- a/drivers/gpu/drm/radeon/radeon_atombios.c
> +++ b/drivers/gpu/drm/radeon/radeon_atombios.c
> @@ -1585,9 +1585,17 @@ struct radeon_encoder_atom_dig *radeon_atombios_get_lvds_info(struct
>                        ATOM_FAKE_EDID_PATCH_RECORD *fake_edid_record;
>                        ATOM_PANEL_RESOLUTION_PATCH_RECORD *panel_res_record;
>                        bool bad_record = false;
> -                       u8 *record = (u8 *)(mode_info->atom_context->bios +
> -                                           data_offset +
> -                                           le16_to_cpu(lvds_info->info.usModePatchTableOffset));
> +                       u8 *record;
> +
> +                       if ((frev == 1) && (crev < 2))
> +                               /* absolute */
> +                               record = (u8 *)(mode_info->atom_context->bios +
> +                                               le16_to_cpu(lvds_info->info.usModePatchTableOffset));
> +                       else
> +                               /* relative */
> +                               record = (u8 *)(mode_info->atom_context->bios +
> +                                               data_offset +
> +                                               le16_to_cpu(lvds_info->info.usModePatchTableOffset));
>                        while (*record != ATOM_RECORD_END_TYPE) {
>                                switch (*record) {
>                                case LCD_MODE_PATCH_RECORD_MODE_TYPE:
> --
> 1.7.1.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@xxxxxxxxxxxxxxxxxxxxx
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>
_______________________________________________
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