mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
drm/cma: Introduce drm_gem_cma_dumb_create_internal()
This function is similar to drm_gem_cma_dumb_create() but targetted at kernel internal users so that they can override the pitch and size requirements of the dumb buffer. It is important to make this difference because the IOCTL says that the pitch and size fields are to be considered outputs and therefore should not be used in computations of the framebuffer size. Internal users may still want to use this code to avoid duplication and at the same time pass on additional, driver-specific restrictions on the pitch and size. While at it, convert the R-Car DU driver, the single user that overrides the pitch, to use the new internal helper. Reviewed-by: Daniel Vetter <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
This commit is contained in:
parent
d7883f8759
commit
6d1782919d
3 changed files with 45 additions and 7 deletions
|
|
@ -29,6 +29,11 @@ to_drm_gem_cma_obj(struct drm_gem_object *gem_obj)
|
|||
/* free GEM object */
|
||||
void drm_gem_cma_free_object(struct drm_gem_object *gem_obj);
|
||||
|
||||
/* create memory region for DRM framebuffer */
|
||||
int drm_gem_cma_dumb_create_internal(struct drm_file *file_priv,
|
||||
struct drm_device *drm,
|
||||
struct drm_mode_create_dumb *args);
|
||||
|
||||
/* create memory region for DRM framebuffer */
|
||||
int drm_gem_cma_dumb_create(struct drm_file *file_priv,
|
||||
struct drm_device *drm,
|
||||
|
|
|
|||
Loading…
Reference in a new issue