login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
April
»
1
Re: [patch] radeon: range check issues
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
[view in full thread]
From: Alex Deucher
Subject:
Re: [patch] radeon: range check issues
Date: Wednesday, March 31, 2010 - 8:43 pm
On Sun, Mar 28, 2010 at 7:23 AM, Dan Carpenter <error27@gmail.com> wrote:
quoted text
> This change makes the array larger, "MAX_SUPPORTED_TV_TIMING_V1_2" is 3 > and the original size "MAX_SUPPORTED_TV_TIMING" is 2. > > Also there were checks that were off by one. > > Signed-off-by: Dan Carpenter <error27@gmail.com> > --- > Compile tested only. Changing the array size seemed like the right > thing to do, in the context, but please review carefully.
That patch is correct and corresponds to the actual table sizes in the vbios. Alex
quoted text
> > diff --git a/drivers/gpu/drm/radeon/atombios.h b/drivers/gpu/drm/radeon/atombios.h > index 6732b5d..27e2c71 100644 > --- a/drivers/gpu/drm/radeon/atombios.h > +++ b/drivers/gpu/drm/radeon/atombios.h > @@ -2912,7 +2912,7 @@ typedef struct _ATOM_ANALOG_TV_INFO_V1_2 > UCHAR ucTV_BootUpDefaultStandard; > UCHAR ucExt_TV_ASIC_ID; > UCHAR ucExt_TV_ASIC_SlaveAddr; > - ATOM_DTD_FORMAT aModeTimings[MAX_SUPPORTED_TV_TIMING]; > + ATOM_DTD_FORMAT aModeTimings[MAX_SUPPORTED_TV_TIMING_V1_2]; > }ATOM_ANALOG_TV_INFO_V1_2; > > typedef struct _ATOM_DPCD_INFO > diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c > index 93783b1..bdc0ab3 100644 > --- a/drivers/gpu/drm/radeon/radeon_atombios.c > +++ b/drivers/gpu/drm/radeon/radeon_atombios.c > @@ -1275,7 +1275,7 @@ bool radeon_atom_get_tv_timings(struct radeon_device *rdev, int index, > switch (crev) { > case 1: > tv_info = (ATOM_ANALOG_TV_INFO *)(mode_info->atom_context->bios + data_offset); > - if (index > MAX_SUPPORTED_TV_TIMING) > + if (index >= MAX_SUPPORTED_TV_TIMING) > return false; > > mode->crtc_htotal = le16_to_cpu(tv_info->aModeTimings[index].usCRTC_H_Total); > @@ -1313,7 +1313,7 @@ bool radeon_atom_get_tv_timings(struct radeon_device *rdev, int index, > break; > case 2: > tv_info_v1_2 = (ATOM_ANALOG_TV_INFO_V1_2 *)(mode_info->atom_context->bios + data_offset); > - if (index > MAX_SUPPORTED_TV_TIMING_V1_2) > + if (index >= MAX_SUPPORTED_TV_TIMING_V1_2) > return false; > > dtd_timings = &tv_info_v1_2->aModeTimings[index]; > >
--
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
Messages in current thread:
[patch] radeon: range check issues
, Dan Carpenter
, (Sun Mar 28, 4:23 am)
Re: [patch] radeon: range check issues
, Alex Deucher
, (Wed Mar 31, 8:43 pm)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Mathieu Desnoyers
[PATCH 01/10] local_t : architecture independant extension
monstr
[PATCH 46/56] microblaze_v2: headers files entry.h current.h mman.h registers.h se...
Ingo Molnar
Re: 2.6.20-rc6-mm3
Jan Engelhardt
Re: Linux Security *Module* Framework (Was: LSM conversion to static interface)
Dave Jones
Re: Why do so many machines need "noapic"?
linux-netdev
:
jamal
[net-next-2.6 PATCH 1/7] xfrm: introduce basic mark infrastructure
jamal
[net-next-2.6 PATCH 0/7] xfrm by MARK
Grant Coady
Re: [bug?] tg3: Failed to load firmware "tigon/tg3_tso.bin"
Matt Mackall
Re: [regression] nf_iterate(), BUG: unable to handle kernel NULL pointer dereference
Jeff Garzik
Re: [PATCH 1/5] sky2: phy setup changes
git
:
Andy Parkins
git-fetch fails with error code 128
Eli Zaretskii
Re: Switching from CVS to GIT
Johannes Sixt
Re: [PATCH v2 04/13] Teach rebase interactive the mark command
Dan Chokola
Re: how do you "force a pull"?
Steffen Prohaska
Re: [msysGit] Re: [PATCH 12/12] [TODO] setup: bring changes from 4msysgit/next to ...
openbsd-misc
:
Ashraf Cotu
Je sur comptable a la banque BCB je vais virée $6.million a la etranger
ropers
Re: Real men don't attack straw men
Pawlowski Marcin Piotr
Re: current on HP EliteBook 8530w
Tony Abernethy
Re: The Atheros story in much fewer words
S H
Re: Short thank you and gratitude note for constant OpenBSD improvements/evolutions!
git-commits-head
:
Linux Kernel Mailing List
No need to do lock_super() for exclusion in generic_shutdown_super()
Linux Kernel Mailing List
x86, msr: Export the register-setting MSR functions via /dev/*/msr
Linux Kernel Mailing List
MIPS: SMTC: Fix lockup in smtc_distribute_timer
Linux Kernel Mailing List
Input: gpio-keys - add support for disabling gpios through sysfs
Linux Kernel Mailing List
[ARM] 5562/2: at91: add gpio button support for at91sam9g20ek
Colocation donated by:
Syndicate