Add weston-drm-fourcc.h
This header is for sharing fallback definitions for drm_fourcc.h. A new test in tests/yuv-buffer-test.c is going to be needing XYUV8888 format, and more new formats will be expected with HDR supports. Share these fallback definitions in one place instead of copying them all over. All users of drm_fourcc.h are converted to include weston-drm-fourcc.h instead for consistency: have the same definitions available everywhere. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
This commit is contained in:
@@ -45,7 +45,6 @@
|
||||
|
||||
#include <xf86drm.h>
|
||||
#include <xf86drmMode.h>
|
||||
#include <drm_fourcc.h>
|
||||
|
||||
#ifdef BUILD_DRM_GBM
|
||||
#include <gbm.h>
|
||||
@@ -56,6 +55,7 @@
|
||||
#include <libweston/backend-drm.h>
|
||||
#include <libweston/weston-log.h>
|
||||
#include "shared/helpers.h"
|
||||
#include "shared/weston-drm-fourcc.h"
|
||||
#include "libinput-seat.h"
|
||||
#include "backend.h"
|
||||
#include "libweston-internal.h"
|
||||
|
||||
@@ -44,7 +44,6 @@
|
||||
|
||||
#include <xf86drm.h>
|
||||
#include <xf86drmMode.h>
|
||||
#include <drm_fourcc.h>
|
||||
|
||||
#include <libudev.h>
|
||||
|
||||
@@ -55,6 +54,7 @@
|
||||
#include "shared/helpers.h"
|
||||
#include "shared/timespec-util.h"
|
||||
#include "shared/string-helpers.h"
|
||||
#include "shared/weston-drm-fourcc.h"
|
||||
#include "pixman-renderer.h"
|
||||
#include "pixel-formats.h"
|
||||
#include "libbacklight.h"
|
||||
|
||||
@@ -33,13 +33,13 @@
|
||||
|
||||
#include <xf86drm.h>
|
||||
#include <xf86drmMode.h>
|
||||
#include <drm_fourcc.h>
|
||||
|
||||
#include <libweston/libweston.h>
|
||||
#include <libweston/backend-drm.h>
|
||||
#include <libweston/pixel-formats.h>
|
||||
#include <libweston/linux-dmabuf.h>
|
||||
#include "shared/helpers.h"
|
||||
#include "shared/weston-drm-fourcc.h"
|
||||
#include "drm-internal.h"
|
||||
#include "linux-dmabuf.h"
|
||||
|
||||
|
||||
@@ -33,11 +33,11 @@
|
||||
|
||||
#include <xf86drm.h>
|
||||
#include <xf86drmMode.h>
|
||||
#include <drm_fourcc.h>
|
||||
|
||||
#include <libweston/libweston.h>
|
||||
#include <libweston/backend-drm.h>
|
||||
#include "shared/helpers.h"
|
||||
#include "shared/weston-drm-fourcc.h"
|
||||
#include "drm-internal.h"
|
||||
#include "pixel-formats.h"
|
||||
#include "presentation-time-server-protocol.h"
|
||||
|
||||
@@ -31,9 +31,9 @@
|
||||
|
||||
#include <xf86drm.h>
|
||||
#include <xf86drmMode.h>
|
||||
#include <drm_fourcc.h>
|
||||
|
||||
#include "drm-internal.h"
|
||||
#include "shared/weston-drm-fourcc.h"
|
||||
|
||||
static const char *const aspect_ratio_as_string[] = {
|
||||
[WESTON_MODE_PIC_AR_NONE] = "",
|
||||
|
||||
@@ -31,9 +31,9 @@
|
||||
|
||||
#include <xf86drm.h>
|
||||
#include <xf86drmMode.h>
|
||||
#include <drm_fourcc.h>
|
||||
|
||||
#include "drm-internal.h"
|
||||
#include "shared/weston-drm-fourcc.h"
|
||||
|
||||
/**
|
||||
* Allocate a new, empty, plane state.
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
#include <string.h>
|
||||
#include <sys/time.h>
|
||||
#include <stdbool.h>
|
||||
#include <drm_fourcc.h>
|
||||
|
||||
#include <libweston/libweston.h>
|
||||
#include <libweston/backend-headless.h>
|
||||
@@ -40,6 +39,7 @@
|
||||
#include "linux-explicit-synchronization.h"
|
||||
#include "pixman-renderer.h"
|
||||
#include "renderer-gl/gl-renderer.h"
|
||||
#include "shared/weston-drm-fourcc.h"
|
||||
#include "shared/weston-egl-ext.h"
|
||||
#include "linux-dmabuf.h"
|
||||
#include "presentation-time-server-protocol.h"
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
#include <sys/mman.h>
|
||||
#include <linux/input.h>
|
||||
|
||||
#include <drm_fourcc.h>
|
||||
#include <wayland-client.h>
|
||||
#include <wayland-cursor.h>
|
||||
|
||||
@@ -49,6 +48,7 @@
|
||||
#include <libweston/libweston.h>
|
||||
#include <libweston/backend-wayland.h>
|
||||
#include "renderer-gl/gl-renderer.h"
|
||||
#include "shared/weston-drm-fourcc.h"
|
||||
#include "shared/weston-egl-ext.h"
|
||||
#include "pixman-renderer.h"
|
||||
#include "shared/helpers.h"
|
||||
|
||||
@@ -39,7 +39,6 @@
|
||||
#include <sys/shm.h>
|
||||
#include <linux/input.h>
|
||||
|
||||
#include <drm_fourcc.h>
|
||||
#include <xcb/xcb.h>
|
||||
#include <xcb/shm.h>
|
||||
#ifdef HAVE_XCB_XKB
|
||||
@@ -58,6 +57,7 @@
|
||||
#include "shared/timespec-util.h"
|
||||
#include "shared/file-util.h"
|
||||
#include "renderer-gl/gl-renderer.h"
|
||||
#include "shared/weston-drm-fourcc.h"
|
||||
#include "shared/weston-egl-ext.h"
|
||||
#include "pixman-renderer.h"
|
||||
#include "presentation-time-server-protocol.h"
|
||||
|
||||
@@ -30,12 +30,11 @@
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <drm_fourcc.h>
|
||||
|
||||
#include <libweston/libweston.h>
|
||||
#include "linux-dmabuf.h"
|
||||
#include "linux-dmabuf-unstable-v1-server-protocol.h"
|
||||
#include "libweston-internal.h"
|
||||
#include "shared/weston-drm-fourcc.h"
|
||||
|
||||
static void
|
||||
linux_dmabuf_buffer_destroy(struct linux_dmabuf_buffer *buffer)
|
||||
|
||||
@@ -31,10 +31,10 @@
|
||||
#include <stdbool.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <drm_fourcc.h>
|
||||
#include <wayland-client-protocol.h>
|
||||
|
||||
#include "shared/helpers.h"
|
||||
#include "shared/weston-drm-fourcc.h"
|
||||
#include "wayland-util.h"
|
||||
#include "pixel-formats.h"
|
||||
|
||||
|
||||
@@ -39,7 +39,6 @@
|
||||
#include <float.h>
|
||||
#include <assert.h>
|
||||
#include <linux/input.h>
|
||||
#include <drm_fourcc.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "linux-sync-file.h"
|
||||
@@ -57,6 +56,7 @@
|
||||
#include "shared/helpers.h"
|
||||
#include "shared/platform.h"
|
||||
#include "shared/timespec-util.h"
|
||||
#include "shared/weston-drm-fourcc.h"
|
||||
#include "shared/weston-egl-ext.h"
|
||||
|
||||
#define BUFFER_DAMAGE_COUNT 2
|
||||
@@ -2303,14 +2303,6 @@ import_simple_dmabuf(struct gl_renderer *gr,
|
||||
return image;
|
||||
}
|
||||
|
||||
/* The kernel header drm_fourcc.h defines the DRM formats below. We duplicate
|
||||
* some of the definitions here so that building Weston won't require
|
||||
* bleeding-edge kernel headers.
|
||||
*/
|
||||
#ifndef DRM_FORMAT_XYUV8888
|
||||
#define DRM_FORMAT_XYUV8888 fourcc_code('X', 'Y', 'U', 'V') /* [31:0] X:Y:Cb:Cr 8:8:8:8 little endian */
|
||||
#endif
|
||||
|
||||
struct yuv_format_descriptor yuv_formats[] = {
|
||||
{
|
||||
.format = DRM_FORMAT_YUYV,
|
||||
|
||||
Reference in New Issue
Block a user