bug report: drm/radeon/kms: HDMI irq support

2010-05-14 Thread Dan Carpenter
: 1] = false; ^^ offset is 8 bits so this condition is always false. + radeon_irq_set(rdev); + regards, dan carpenter

[patch] drm_edid: There should be 6 Standard Timings

2010-05-14 Thread Dan Carpenter
of elements here doesn't change the overall size of the union. Signed-off-by: Dan Carpenter erro...@gmail.com --- This patch applies to drm-next. diff --git a/include/drm/drm_edid.h b/include/drm/drm_edid.h index d33c3e0..39e2cc5 100644 --- a/include/drm/drm_edid.h +++ b/include/drm/drm_edid.h @@ -120,7

[patch -next] i915: remove unneeded null checks

2010-05-07 Thread Dan Carpenter
The encoder variable can never be null because it is used as loop cursor in a list_for_each_entry() loop. Signed-off-by: Dan Carpenter erro...@gmail.com diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index f6299bb..950dc8d 100644 --- a/drivers/gpu/drm/i915

[patch -next] i915/intel_sdvo: remove unneeded null check

2010-05-07 Thread Dan Carpenter
The connector variable is used as the cursor in a list_for_each_entry() and it's always non-null so we don't need to check it. Signed-off-by: Dan Carpenter erro...@gmail.com diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c index 42ceb15..179d146 100644

Re: drm_edid: potential range checking issue?

2010-05-07 Thread Dan Carpenter
Ping. This off-by-one overflow is still there in -next. I'm not sure how to fix it because both the declaraion and the use in add_detailed_modes() look deliberate. regards, dan carpenter On Sun, Mar 28, 2010 at 02:25:58PM +0300, Dan Carpenter wrote: Hi list, :) Just going through some

[patch] i915: missing unlock on error path

2010-05-07 Thread Dan Carpenter
There was a missing mutex_unlock(dev-struct_mutex) on this error path. Signed-off-by: Dan Carpenter erro...@gmail.com --- I thought Jiri sent this patch earlier but a google search for stanse struct_mutex i965_reset didn't find any patches, so I'm resending. diff --git a/drivers/gpu/drm/i915

[patch -next] drm: dereferencing before checking for null

2010-05-07 Thread Dan Carpenter
The original code dereferences fb_helper_conn before verifying that it's non-null. Signed-off-by: Dan Carpenter erro...@gmail.com --- It's never null here actually. I could send a patch to remove the check instead if that's prefered. diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu

[patch -next] drm: off by one in drm_edid.c

2010-05-07 Thread Dan Carpenter
m == num_est3_modes is one past the end of the est3_modes[]. Signed-off-by: Dan Carpenter erro...@gmail.com diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index 7188674..46447b0 100644 --- a/drivers/gpu/drm/drm_edid.c +++ b/drivers/gpu/drm/drm_edid.c @@ -1383,7 +1383,7

[patch] nouveau: off by one in nv50_gpio_location()

2010-04-22 Thread Dan Carpenter
If gpio-line is 32 then nv50_gpio_reg[gpio-line 3] reads past the end of the array. Signed-off-by: Dan Carpenter erro...@gmail.com diff --git a/drivers/gpu/drm/nouveau/nv50_gpio.c b/drivers/gpu/drm/nouveau/nv50_gpio.c index c61782b..bb47ad7 100644 --- a/drivers/gpu/drm/nouveau/nv50_gpio.c

[patch] nouveau: fix memory leak

2010-04-07 Thread Dan Carpenter
In the original code there was a typo and we called kfree(pgraph-ctxprog) two times instead of kfree(pgraph-ctxvals); Also it's OK to pass NULL variables to kfree(). checkpatch.pl complains about this so I removed the checks. Signed-off-by: Dan Carpenter erro...@gmail.com diff --git a/drivers

smatch: radeon: unsigned is never less than zero

2010-04-06 Thread Dan Carpenter
error = abs(current_freq - freq); regards, dan carpenter -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications

[patch] radeon: small memory leak

2010-04-06 Thread Dan Carpenter
This is an unlikely memory leak, but we may as well fix it. It's easy to fix and every static checker will complain if we don't. Signed-off-by: Dan Carpenter erro...@gmail.com diff --git a/drivers/gpu/drm/radeon/atom.c b/drivers/gpu/drm/radeon/atom.c index 247f8ee..58845e0 100644 --- a/drivers

Re: [patch] drm: sysfs files error handling

2010-03-30 Thread Dan Carpenter
On Sun, Mar 28, 2010 at 10:55:14PM +0200, Andi Kleen wrote: , Dan Carpenter wrote: In the original code we used j as an iterator but we used i as an index. - for (j = 0; j i; j++) - device_remove_file(connector-kdev, -connector_attrs[i]); I guess

[patch] via: off by one issue

2010-03-28 Thread Dan Carpenter
fx-lock is used as the index in dev_priv-decoder_queue[fx-lock] which is an array of VIA_NR_XVMC_LOCKS elements. Signed-off-by: Dan Carpenter erro...@gmail.com diff --git a/drivers/gpu/drm/via/via_video.c b/drivers/gpu/drm/via/via_video.c index 6ec04ac..6efac81 100644 --- a/drivers/gpu/drm/via

[patch] radeon: range check issues

2010-03-28 Thread Dan Carpenter
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 erro...@gmail.com --- Compile tested only. Changing the array size seemed like the right thing

drm_edid: potential range checking issue?

2010-03-28 Thread Dan Carpenter
; struct detailed_data_monitor_range range; struct detailed_data_wpindex color; struct std_timing timings[5]; ^ struct cvt_timing cvt[4]; } data; } __attribute__((packed)); regards, dan

[patch] drm: fix check for end of loop

2010-03-28 Thread Dan Carpenter
agpmem is never NULL here. Signed-off-by: Dan Carpenter erro...@gmail.com diff --git a/drivers/gpu/drm/drm_memory.c b/drivers/gpu/drm/drm_memory.c index e4865f9..7732268 100644 --- a/drivers/gpu/drm/drm_memory.c +++ b/drivers/gpu/drm/drm_memory.c @@ -77,7 +77,7 @@ static void *agp_remap(unsigned

[patch] drm: sysfs files error handling

2010-03-28 Thread Dan Carpenter
passed the end of the array. Which makes sense if we should be using j there. I also thought that we should remove the files for connector_attrs_opt1 but to do that I had to add separate iterators for connector_attrs and connector_attrs_opt1. Signed-off-by: Dan Carpenter erro...@gmail.com --- Found

radeon: bug using unsigned int

2010-03-11 Thread Dan Carpenter
557 error = abs(current_freq - freq); regards, dan carpenter -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs

[patch] i915: fix small leak on error path

2010-03-06 Thread Dan Carpenter
We should free params before returning. Signed-off-by: Dan Carpenter erro...@gmail.com diff --git a/drivers/gpu/drm/i915/intel_overlay.c b/drivers/gpu/drm/i915/intel_overlay.c index d355d1d..60595fc 100644 --- a/drivers/gpu/drm/i915/intel_overlay.c +++ b/drivers/gpu/drm/i915/intel_overlay.c

[patch] fix small memory leak in ttm_memory.c

2009-11-28 Thread Dan Carpenter
I moved the allocation until after the check for (si-totalhigh == 0). regards, dan carpenter Signed-off-by: Dan Carpenter erro...@gmail.com --- orig/drivers/gpu/drm/ttm/ttm_memory.c 2009-11-28 07:05:54.0 +0200 +++ devel/drivers/gpu/drm/ttm/ttm_memory.c 2009-11-28 07:07

[patch] move dereference after null check

2009-11-18 Thread Dan Carpenter
I moved the fence dereference after the check. rdev is fence-rdev so I moved the rdev deference as well. This was found by static analysis so I can't say whether fence is ever actually null but it's a good thing to do either way. regards, dan carpenter Signed-off-by: Dan Carpenter erro