drm: add an fb creation ioctl that takes a pixel format v5
To properly support the various plane formats supported by different hardware, the kernel must know the pixel format of a framebuffer object. So add a new ioctl taking a format argument corresponding to a fourcc name from the new drm_fourcc.h header file. Implement the fb creation hooks in terms of the new mode_fb_cmd2 using helpers where the old bpp/depth values are needed. v2: create DRM specific fourcc header file for sharing with libdrm etc v3: fix rebase failure and use DRM fourcc codes in intel_display.c and update commit message v4: make fb_cmd2 handle field into an array for multi-object formats pull in Ville's fix for the memcpy in drm_plane_init apply Ville's cleanup to zero out fb_cmd2 arg in drm_mode_addfb v5: add 'flags' field for interlaced support (from Ville) Signed-off-by:Ville Syrjälä <ville.syrjala@linux.intel.com> Acked-by:
Alan Cox <alan@lxorguk.ukuu.org.uk> Reviewed-by:
Rob Clark <rob.clark@linaro.org> Signed-off-by:
Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by:
Dave Airlie <airlied@redhat.com>
Showing
- drivers/gpu/drm/drm_crtc.c 106 additions, 5 deletionsdrivers/gpu/drm/drm_crtc.c
- drivers/gpu/drm/drm_crtc_helper.c 47 additions, 4 deletionsdrivers/gpu/drm/drm_crtc_helper.c
- drivers/gpu/drm/drm_drv.c 1 addition, 0 deletionsdrivers/gpu/drm/drm_drv.c
- drivers/gpu/drm/i915/intel_display.c 21 additions, 18 deletionsdrivers/gpu/drm/i915/intel_display.c
- drivers/gpu/drm/i915/intel_drv.h 1 addition, 1 deletiondrivers/gpu/drm/i915/intel_drv.h
- drivers/gpu/drm/i915/intel_fb.c 6 additions, 5 deletionsdrivers/gpu/drm/i915/intel_fb.c
- drivers/gpu/drm/nouveau/nouveau_display.c 3 additions, 3 deletionsdrivers/gpu/drm/nouveau/nouveau_display.c
- drivers/gpu/drm/nouveau/nouveau_fb.h 1 addition, 1 deletiondrivers/gpu/drm/nouveau/nouveau_fb.h
- drivers/gpu/drm/nouveau/nouveau_fbcon.c 7 additions, 6 deletionsdrivers/gpu/drm/nouveau/nouveau_fbcon.c
- drivers/gpu/drm/radeon/radeon_display.c 4 additions, 4 deletionsdrivers/gpu/drm/radeon/radeon_display.c
- drivers/gpu/drm/radeon/radeon_fb.c 11 additions, 7 deletionsdrivers/gpu/drm/radeon/radeon_fb.c
- drivers/gpu/drm/radeon/radeon_mode.h 1 addition, 1 deletiondrivers/gpu/drm/radeon/radeon_mode.h
- drivers/gpu/drm/vmwgfx/vmwgfx_kms.c 15 additions, 7 deletionsdrivers/gpu/drm/vmwgfx/vmwgfx_kms.c
- drivers/gpu/drm/vmwgfx/vmwgfx_kms.h 1 addition, 0 deletionsdrivers/gpu/drm/vmwgfx/vmwgfx_kms.h
- drivers/staging/gma500/framebuffer.c 1 addition, 1 deletiondrivers/staging/gma500/framebuffer.c
- include/drm/drm.h 1 addition, 0 deletionsinclude/drm/drm.h
- include/drm/drm_crtc.h 7 additions, 2 deletionsinclude/drm/drm_crtc.h
- include/drm/drm_crtc_helper.h 3 additions, 1 deletioninclude/drm/drm_crtc_helper.h
- include/drm/drm_fourcc.h 63 additions, 0 deletionsinclude/drm/drm_fourcc.h
- include/drm/drm_mode.h 27 additions, 0 deletionsinclude/drm/drm_mode.h
Loading
Please register or sign in to comment