[PATCH] drm: Fix setting of fb_changed in drm_crtc_helper_set_config()

2010-01-17 Thread Roel Kluin
Only set fb_changed if bits_per_pixel or depth changed. Signed-off-by: Roel Kluin --- diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c index 7d0f00a..89197c1 100644 --- a/drivers/gpu/drm/drm_crtc_helper.c +++ b/drivers/gpu/drm/drm_crtc_helper.c @@ -840,8 +840,6

[PATCH] drm/radeon/kms: crtc_ omitted in display assignments in radeon_atom_mode_fixup()?

2010-01-15 Thread Roel Kluin
The crtc_ prefix was omitted in h/vdisplay assignments Signed-off-by: Roel Kluin --- Not sure, but maybe the change below is needed? please ack/nack. diff --git a/drivers/gpu/drm/radeon/radeon_encoders.c b/drivers/gpu/drm/radeon/radeon_encoders.c index 82eb551..a9dc073 100644 --- a/drivers/gpu

[PATCH] drm/kms: Fix &&/|| confusion in drm_fb_helper_connector_parse_command_line()

2009-12-31 Thread Roel Kluin
This always evaluates to true. Signed-off-by: Roel Kluin --- drivers/gpu/drm/drm_fb_helper.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index 1b49fa0..100ee48 100644 --- a/drivers/gpu/drm

Re: [patch] Fix: 'return -ENOMEM' instead of 'return ENOMEM'

2009-11-12 Thread roel kluin
> * Andrew Morton wrote: >> Andy, can we have a checkpatch rule please? > > Note, that will upset creative uses of error codes i guess, such as > fs/xfs/. > > But yeah, +1 from me too. > > Ob'post'mortem - looked for similar patterns in the kernel and there's > quite a few bugs there: > >  includ

[PATCH] drm: Cleanup redundant tests on unsigned

2009-10-25 Thread Roel Kluin
The variables are unsigned so the `< 0' test always fails. The other part of the test catches wrapped values. Signed-off-by: Roel Kluin --- drivers/gpu/drm/i915/i915_opregion.c|2 +- drivers/gpu/drm/radeon/radeon_combios.c |2 +- 2 files changed, 2 insertions(+), 2 d

[PATCH] drm/radeon: Fix setting of bits

2009-10-06 Thread Roel Kluin
Duplicate bits set Signed-off-by: Roel Kluin --- Please review. I merely guessed what it should be. diff --git a/drivers/gpu/drm/radeon/radeon_clocks.c b/drivers/gpu/drm/radeon/radeon_clocks.c index 152eef1..f5c32a7 100644 --- a/drivers/gpu/drm/radeon/radeon_clocks.c +++ b/drivers/gpu/drm

[PATCH] drm: dereference of tmp in drm_proc_create_files()

2009-08-30 Thread Roel Kluin
tmp allocation may fail, prevent a dereference. Signed-off-by: Roel Kluin --- diff --git a/drivers/gpu/drm/drm_proc.c b/drivers/gpu/drm/drm_proc.c index bbd4b3d..dc967af 100644 --- a/drivers/gpu/drm/drm_proc.c +++ b/drivers/gpu/drm/drm_proc.c @@ -106,6 +106,10 @@ int drm_proc_create_files(struct

[PATCH] drm/i915: intel_sdvo_multifunc_encoder() SDVO_OUTPUT_SVID0 tested twice

2009-08-09 Thread Roel Kluin
bit SDVO_OUTPUT_SVID0 is tested twice Signed-off-by: Roel Kluin --- diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c index 5371d93..95ca0ac 100644 --- a/drivers/gpu/drm/i915/intel_sdvo.c +++ b/drivers/gpu/drm/i915/intel_sdvo.c @@ -1458,7 +1458,7

[PATCH] drm/radeon: Read buffer overflow

2009-08-03 Thread Roel Kluin
Check whether index is within bounds before grabbing the element. Signed-off-by: Roel Kluin --- diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c index c550932..b2b7812 100644 --- a/drivers/gpu/drm/radeon/r100.c +++ b/drivers/gpu/drm/radeon/r100.c @@ -719,13 +719,14

[PATCH] ttm: Read buffer overflow

2009-08-03 Thread Roel Kluin
Check whether index is within bounds before grabbing the element. Signed-off-by: Roel Kluin --- diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index c1c407f..bc8f040 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c @@ -1150,13 +1150,14

[PATH] i915: Read outside array bounds

2009-07-26 Thread Roel Kluin
dev_priv->saveSWF1 is a 16 element array, but this reads up to index 22 Signed-off-by: Roel Kluin --- save_state does not do this addition, can it be removed? please review. diff --git a/drivers/gpu/drm/i915/i915_suspend.c b/drivers/gpu/drm/i915/i915_suspend.c index 9e1d16e..1d04e19 100

[PATCH] drm: count reaches -1

2009-04-16 Thread Roel Kluin
I previously sent this patch, was it lost? -->8-8<- With a postfix decrement in the test count will reach -1 rather than 0, subsequent tests fail. Signed-off-by: Roel Kluin --- diff --git a/drivers/gpu/drm/via/via_d

[PATCH v2] drm: count reaches -1, tested 0

2009-02-10 Thread Roel Kluin
y well reviewed, thanks. Like this? --->8---8< With a postfix decrement in the test count will reach -1 rather than 0, subsequent tests fail. Signed-off-by: Roel Kluin --- diff --git a/drivers/gpu/drm/via/via_dma.c b/drivers/gpu/drm/via

[PATCH] drm: count reaches -1, tested 0

2009-02-09 Thread Roel Kluin
With a postfix decrement count will reach -1 rather than 0, subsequent tests fail. Signed-off-by: Roel Kluin --- diff --git a/drivers/gpu/drm/via/via_dma.c b/drivers/gpu/drm/via/via_dma.c index 7a339db..600315c 100644 --- a/drivers/gpu/drm/via/via_dma.c +++ b/drivers/gpu/drm/via/via_dma.c

[PATCH] drm: count reaches -1, tested 0

2009-01-31 Thread Roel Kluin
With a postfix decrement count will reach -1 rather than 0, subsequent tests fail. Signed-off-by: Roel Kluin --- diff --git a/drivers/gpu/drm/via/via_dma.c b/drivers/gpu/drm/via/via_dma.c index 7a339db..600315c 100644 --- a/drivers/gpu/drm/via/via_dma.c +++ b/drivers/gpu/drm/via/via_dma.c

[PATCH] drm: fix LOCK_TEST_WITH_RETURN macro

2009-01-22 Thread Roel Kluin
fix LOCK_TEST_WITH_RETURN macro: When this macro isn't called with 'file_priv' this will result in a build failure. Signed-off-by: Roel Kluin --- diff --git a/include/drm/drmP.h b/include/drm/drmP.h index afb7858..7437927 100644 --- a/include/drm/drmP.h +++ b/include/drm/dr

[PATCH 10/33] drm/i915: Make static

2008-12-09 Thread Roel Kluin
Sparse asked whether these could be static. Signed-off-by: Roel Kluin <[EMAIL PROTECTED]> --- drivers/gpu/drm/i915/i915_opregion.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_opregion.c b/drivers/gpu/drm/i915/i915_opregion.c

in drm_sysfs_device_add() on err_out_files: is index i correct?

2008-08-26 Thread roel kluin
In drivers/char/drm/drm_sysfs.c:187, function drm_sysfs_device_add(): for (i = 0; i < ARRAY_SIZE(device_attrs); i++) { err = device_create_file(&minor->kdev, &device_attrs[i]); if (err) goto err_out_files; } return 0; err_out_files: if (i > 0)