Message ID | 20180810131903.5179-1-stanislav.lisovskiy@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Add XYUV format support | expand |
Hi Stanislav, FYI, we are trying to add same format under a slightly different name. See https://lists.freedesktop.org/archives/dri-devel/2018-July/184598.html On Fri, Aug 10, 2018 at 04:19:03PM +0300, StanLis wrote: > From: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com> > > v5: This is YUV444 packed format same as AYUV, but without alpha, > as supported by i915. > > Signed-off-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com> > --- > drivers/gpu/drm/drm_fourcc.c | 1 + > include/uapi/drm/drm_fourcc.h | 1 + > 2 files changed, 2 insertions(+) > > diff --git a/drivers/gpu/drm/drm_fourcc.c b/drivers/gpu/drm/drm_fourcc.c > index 5ca6395cd4d3..5bde1b20a098 100644 > --- a/drivers/gpu/drm/drm_fourcc.c > +++ b/drivers/gpu/drm/drm_fourcc.c > @@ -173,6 +173,7 @@ const struct drm_format_info *__drm_format_info(u32 format) > { .format = DRM_FORMAT_UYVY, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 1 }, > { .format = DRM_FORMAT_VYUY, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 1 }, > { .format = DRM_FORMAT_AYUV, .depth = 0, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true }, > + { .format = DRM_FORMAT_XYUV, .depth = 0, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = false }, I would rather drop the .has_alpha = false, since these lines are long enough already. > }; > > unsigned int i; > diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourcc.h > index d5e52350a3aa..c4eb69468eda 100644 > --- a/include/uapi/drm/drm_fourcc.h > +++ b/include/uapi/drm/drm_fourcc.h > @@ -112,6 +112,7 @@ extern "C" { > #define DRM_FORMAT_VYUY fourcc_code('V', 'Y', 'U', 'Y') /* [31:0] Y1:Cb0:Y0:Cr0 8:8:8:8 little endian */ > > #define DRM_FORMAT_AYUV fourcc_code('A', 'Y', 'U', 'V') /* [31:0] A:Y:Cb:Cr 8:8:8:8 little endian */ > +#define DRM_FORMAT_XYUV fourcc_code('X', 'Y', 'U', 'V') /* [31:0] X:Y:Cb:Cr 8:8:8:8 little endian */ > > /* > * 2 plane RGB + A > -- > 2.17.0 > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel
On Fri, 2018-08-10 at 19:01 +0100, Alexandru-Cosmin Gheorghe wrote: > Hi Stanislav, > > FYI, we are trying to add same format under a slightly different > name. > See https://lists.freedesktop.org/archives/dri-devel/2018- > July/184598.html So we probably just need to decide, if this should be DRM_FORMAT_XYUV or DRM_FORMAT_XYUV8888 :) > > On Fri, Aug 10, 2018 at 04:19:03PM +0300, StanLis wrote: > > From: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com> > > > > v5: This is YUV444 packed format same as AYUV, but without alpha, > > as supported by i915. > > > > Signed-off-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com> > > --- > > drivers/gpu/drm/drm_fourcc.c | 1 + > > include/uapi/drm/drm_fourcc.h | 1 + > > 2 files changed, 2 insertions(+) > > > > diff --git a/drivers/gpu/drm/drm_fourcc.c > > b/drivers/gpu/drm/drm_fourcc.c > > index 5ca6395cd4d3..5bde1b20a098 100644 > > --- a/drivers/gpu/drm/drm_fourcc.c > > +++ b/drivers/gpu/drm/drm_fourcc.c > > @@ -173,6 +173,7 @@ const struct drm_format_info > > *__drm_format_info(u32 format) > > { .format = DRM_FORMAT_UYVY, .depth > > = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 1 }, > > { .format = DRM_FORMAT_VYUY, .depth > > = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 1 }, > > { .format = DRM_FORMAT_AYUV, .depth > > = 0, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, > > .has_alpha = true }, > > + { .format = DRM_FORMAT_XYUV, .depth > > = 0, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, > > .has_alpha = false }, > > I would rather drop the .has_alpha = false, since these lines are > long > enough already. Sounds reasonable. > > > }; > > > > unsigned int i; > > diff --git a/include/uapi/drm/drm_fourcc.h > > b/include/uapi/drm/drm_fourcc.h > > index d5e52350a3aa..c4eb69468eda 100644 > > --- a/include/uapi/drm/drm_fourcc.h > > +++ b/include/uapi/drm/drm_fourcc.h > > @@ -112,6 +112,7 @@ extern "C" { > > #define DRM_FORMAT_VYUY fourcc_code('V', 'Y', 'U', > > 'Y') /* [31:0] Y1:Cb0:Y0:Cr0 8:8:8:8 little endian */ > > > > #define DRM_FORMAT_AYUV fourcc_code('A', 'Y', 'U', > > 'V') /* [31:0] A:Y:Cb:Cr 8:8:8:8 little endian */ > > +#define DRM_FORMAT_XYUV fourcc_code('X', 'Y', 'U', > > 'V') /* [31:0] X:Y:Cb:Cr 8:8:8:8 little endian */ > > > > /* > > * 2 plane RGB + A > > -- > > 2.17.0 > > > > _______________________________________________ > > dri-devel mailing list > > dri-devel@lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/dri-devel > >
diff --git a/drivers/gpu/drm/drm_fourcc.c b/drivers/gpu/drm/drm_fourcc.c index 5ca6395cd4d3..5bde1b20a098 100644 --- a/drivers/gpu/drm/drm_fourcc.c +++ b/drivers/gpu/drm/drm_fourcc.c @@ -173,6 +173,7 @@ const struct drm_format_info *__drm_format_info(u32 format) { .format = DRM_FORMAT_UYVY, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 1 }, { .format = DRM_FORMAT_VYUY, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 1 }, { .format = DRM_FORMAT_AYUV, .depth = 0, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true }, + { .format = DRM_FORMAT_XYUV, .depth = 0, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = false }, }; unsigned int i; diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourcc.h index d5e52350a3aa..c4eb69468eda 100644 --- a/include/uapi/drm/drm_fourcc.h +++ b/include/uapi/drm/drm_fourcc.h @@ -112,6 +112,7 @@ extern "C" { #define DRM_FORMAT_VYUY fourcc_code('V', 'Y', 'U', 'Y') /* [31:0] Y1:Cb0:Y0:Cr0 8:8:8:8 little endian */ #define DRM_FORMAT_AYUV fourcc_code('A', 'Y', 'U', 'V') /* [31:0] A:Y:Cb:Cr 8:8:8:8 little endian */ +#define DRM_FORMAT_XYUV fourcc_code('X', 'Y', 'U', 'V') /* [31:0] X:Y:Cb:Cr 8:8:8:8 little endian */ /* * 2 plane RGB + A