[PATCH v2] DRM: Add DRM kms/fb cma helper

2012-06-04 Thread Lars-Peter Clausen
On 05/31/2012 08:11 PM, Sascha Hauer wrote: > On Thu, May 31, 2012 at 11:34:37AM +0200, Lars-Peter Clausen wrote: + drm_helper_mode_fill_fb_struct(_cma->fb, mode_cmd); + + for (i = 0; i < num_planes; i++) + fb_cma->obj[i] = obj[i]; >>> >>> Check for valid num_planes

Re: [PATCH v2] DRM: Add DRM kms/fb cma helper

2012-06-04 Thread Lars-Peter Clausen
On 05/31/2012 08:11 PM, Sascha Hauer wrote: On Thu, May 31, 2012 at 11:34:37AM +0200, Lars-Peter Clausen wrote: + drm_helper_mode_fill_fb_struct(fb_cma-fb, mode_cmd); + + for (i = 0; i num_planes; i++) + fb_cma-obj[i] = obj[i]; Check for valid num_planes before this loop? Hm,

[PATCH v2] DRM: Add DRM kms/fb cma helper

2012-05-31 Thread Sascha Hauer
On Thu, May 31, 2012 at 11:34:37AM +0200, Lars-Peter Clausen wrote: > >> + drm_helper_mode_fill_fb_struct(_cma->fb, mode_cmd); > >> + > >> + for (i = 0; i < num_planes; i++) > >> + fb_cma->obj[i] = obj[i]; > > > > Check for valid num_planes before this loop? > > > > Hm, I think the

[PATCH v2] DRM: Add DRM kms/fb cma helper

2012-05-31 Thread Lars-Peter Clausen
On 05/31/2012 10:13 AM, Sascha Hauer wrote: > On Wed, May 30, 2012 at 05:30:15PM +0200, Lars-Peter Clausen wrote: >> This patch introduces a set of helper function for implementing the KMS >> framebuffer layer for drivers which use the drm gem CMA helper function. >> >> Signed-off-by: Lars-Peter

[PATCH v2] DRM: Add DRM kms/fb cma helper

2012-05-31 Thread Sascha Hauer
On Wed, May 30, 2012 at 05:30:15PM +0200, Lars-Peter Clausen wrote: > This patch introduces a set of helper function for implementing the KMS > framebuffer layer for drivers which use the drm gem CMA helper function. > > Signed-off-by: Lars-Peter Clausen > > --- > Changes since v1: > *

Re: [PATCH v2] DRM: Add DRM kms/fb cma helper

2012-05-31 Thread Sascha Hauer
On Wed, May 30, 2012 at 05:30:15PM +0200, Lars-Peter Clausen wrote: This patch introduces a set of helper function for implementing the KMS framebuffer layer for drivers which use the drm gem CMA helper function. Signed-off-by: Lars-Peter Clausen l...@metafoo.de --- Changes since v1:

Re: [PATCH v2] DRM: Add DRM kms/fb cma helper

2012-05-31 Thread Lars-Peter Clausen
On 05/31/2012 10:13 AM, Sascha Hauer wrote: On Wed, May 30, 2012 at 05:30:15PM +0200, Lars-Peter Clausen wrote: This patch introduces a set of helper function for implementing the KMS framebuffer layer for drivers which use the drm gem CMA helper function. Signed-off-by: Lars-Peter Clausen

Re: [PATCH v2] DRM: Add DRM kms/fb cma helper

2012-05-31 Thread Sascha Hauer
On Thu, May 31, 2012 at 11:34:37AM +0200, Lars-Peter Clausen wrote: + drm_helper_mode_fill_fb_struct(fb_cma-fb, mode_cmd); + + for (i = 0; i num_planes; i++) + fb_cma-obj[i] = obj[i]; Check for valid num_planes before this loop? Hm, I think the callers already take

[PATCH v2] DRM: Add DRM kms/fb cma helper

2012-05-30 Thread Lars-Peter Clausen
This patch introduces a set of helper function for implementing the KMS framebuffer layer for drivers which use the drm gem CMA helper function. Signed-off-by: Lars-Peter Clausen --- Changes since v1: * Some spelling fixes * Add missing kfree in drm_fb_cma_alloc error path

[PATCH v2] DRM: Add DRM kms/fb cma helper

2012-05-30 Thread Lars-Peter Clausen
This patch introduces a set of helper function for implementing the KMS framebuffer layer for drivers which use the drm gem CMA helper function. Signed-off-by: Lars-Peter Clausen l...@metafoo.de --- Changes since v1: * Some spelling fixes * Add missing kfree in drm_fb_cma_alloc