All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/fourcc: add Vivante tile status modifiers
@ 2022-09-09  9:30 Lucas Stach
  2022-09-10 13:21 ` Christian Gmeiner
  2022-09-26 17:57 ` Guido Günther
  0 siblings, 2 replies; 3+ messages in thread
From: Lucas Stach @ 2022-09-09  9:30 UTC (permalink / raw)
  To: dri-devel; +Cc: kernel, etnaviv, patchwork-lst, Thomas Zimmermann

The tile status modifiers can be combined with all of the usual
color buffer modifiers. When they are present an additional plane
is added to the surfaces to share the tile status buffer. The
TS modifiers describe the interpretation of the tag bits in this
buffer.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
 include/uapi/drm/drm_fourcc.h | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourcc.h
index 0980678d502d..93b022498900 100644
--- a/include/uapi/drm/drm_fourcc.h
+++ b/include/uapi/drm/drm_fourcc.h
@@ -718,6 +718,35 @@ extern "C" {
  */
 #define DRM_FORMAT_MOD_VIVANTE_SPLIT_SUPER_TILED fourcc_mod_code(VIVANTE, 4)
 
+/*
+ * Vivante TS (tile-status) buffer modifiers. They can be combined with all of
+ * the color buffer tiling modifiers defined above. When TS is present it's a
+ * separate buffer containing the clear/compression status of each tile. The
+ * modifiers are defined as VIVANTE_MOD_TS_c_s, where c is the color buffer
+ * tile size in bytes covered by one entry in the status buffer and s is the
+ * number of status bits per entry.
+ * We reserve the top 8 bits of the Vivante modifier space for tile status
+ * clear/compression modifiers, as future cores might add some more TS layout
+ * variations.
+ */
+#define VIVANTE_MOD_TS_64_4               (1ULL << 48)
+#define VIVANTE_MOD_TS_64_2               (2ULL << 48)
+#define VIVANTE_MOD_TS_128_4              (3ULL << 48)
+#define VIVANTE_MOD_TS_256_4              (4ULL << 48)
+#define VIVANTE_MOD_TS_MASK               (0xfULL << 48)
+
+/*
+ * Vivante compression modifiers. Those depend on a TS modifier being present
+ * as the TS bits get reinterpreted as compression tags instead of simple
+ * clear markers when compression is enabled.
+ */
+#define VIVANTE_MOD_COMP_DEC400           (1ULL << 52)
+#define VIVANTE_MOD_COMP_MASK             (0xfULL << 52)
+
+/* Masking out the extension bits will yield the base modifier. */
+#define VIVANTE_MOD_EXT_MASK              (VIVANTE_MOD_TS_MASK | \
+                                           VIVANTE_MOD_COMP_MASK)
+
 /* NVIDIA frame buffer modifiers */
 
 /*
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/fourcc: add Vivante tile status modifiers
  2022-09-09  9:30 [PATCH] drm/fourcc: add Vivante tile status modifiers Lucas Stach
@ 2022-09-10 13:21 ` Christian Gmeiner
  2022-09-26 17:57 ` Guido Günther
  1 sibling, 0 replies; 3+ messages in thread
From: Christian Gmeiner @ 2022-09-10 13:21 UTC (permalink / raw)
  To: Lucas Stach; +Cc: Thomas Zimmermann, etnaviv, patchwork-lst, dri-devel, kernel

Hi Lucas

Am Fr., 9. Sept. 2022 um 11:30 Uhr schrieb Lucas Stach <l.stach@pengutronix.de>:
>
> The tile status modifiers can be combined with all of the usual
> color buffer modifiers. When they are present an additional plane
> is added to the surfaces to share the tile status buffer. The
> TS modifiers describe the interpretation of the tag bits in this
> buffer.
>
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>

Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>

-- 
greets
--
Christian Gmeiner, MSc

https://christian-gmeiner.info/privacypolicy

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/fourcc: add Vivante tile status modifiers
  2022-09-09  9:30 [PATCH] drm/fourcc: add Vivante tile status modifiers Lucas Stach
  2022-09-10 13:21 ` Christian Gmeiner
@ 2022-09-26 17:57 ` Guido Günther
  1 sibling, 0 replies; 3+ messages in thread
From: Guido Günther @ 2022-09-26 17:57 UTC (permalink / raw)
  To: Lucas Stach; +Cc: Thomas Zimmermann, etnaviv, patchwork-lst, dri-devel, kernel

Hi,
On Fri, Sep 09, 2022 at 11:30:00AM +0200, Lucas Stach wrote:
> The tile status modifiers can be combined with all of the usual
> color buffer modifiers. When they are present an additional plane
> is added to the surfaces to share the tile status buffer. The
> TS modifiers describe the interpretation of the tag bits in this
> buffer.
> 
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> ---
>  include/uapi/drm/drm_fourcc.h | 29 +++++++++++++++++++++++++++++
>  1 file changed, 29 insertions(+)
> 
> diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourcc.h
> index 0980678d502d..93b022498900 100644
> --- a/include/uapi/drm/drm_fourcc.h
> +++ b/include/uapi/drm/drm_fourcc.h
> @@ -718,6 +718,35 @@ extern "C" {
>   */
>  #define DRM_FORMAT_MOD_VIVANTE_SPLIT_SUPER_TILED fourcc_mod_code(VIVANTE, 4)
>  
> +/*
> + * Vivante TS (tile-status) buffer modifiers. They can be combined with all of
> + * the color buffer tiling modifiers defined above. When TS is present it's a
> + * separate buffer containing the clear/compression status of each tile. The
> + * modifiers are defined as VIVANTE_MOD_TS_c_s, where c is the color buffer
> + * tile size in bytes covered by one entry in the status buffer and s is the
> + * number of status bits per entry.
> + * We reserve the top 8 bits of the Vivante modifier space for tile status
> + * clear/compression modifiers, as future cores might add some more TS layout
> + * variations.
> + */
> +#define VIVANTE_MOD_TS_64_4               (1ULL << 48)
> +#define VIVANTE_MOD_TS_64_2               (2ULL << 48)
> +#define VIVANTE_MOD_TS_128_4              (3ULL << 48)
> +#define VIVANTE_MOD_TS_256_4              (4ULL << 48)
> +#define VIVANTE_MOD_TS_MASK               (0xfULL << 48)
> +
> +/*
> + * Vivante compression modifiers. Those depend on a TS modifier being present
> + * as the TS bits get reinterpreted as compression tags instead of simple
> + * clear markers when compression is enabled.
> + */
> +#define VIVANTE_MOD_COMP_DEC400           (1ULL << 52)
> +#define VIVANTE_MOD_COMP_MASK             (0xfULL << 52)
> +
> +/* Masking out the extension bits will yield the base modifier. */
> +#define VIVANTE_MOD_EXT_MASK              (VIVANTE_MOD_TS_MASK | \
> +                                           VIVANTE_MOD_COMP_MASK)
> +
>  /* NVIDIA frame buffer modifiers */
>  
>  /*


Reviewed-by: Guido Günther <agx@sigxcpu.org>

Cheers,
 -- Guido

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-09-26 17:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-09  9:30 [PATCH] drm/fourcc: add Vivante tile status modifiers Lucas Stach
2022-09-10 13:21 ` Christian Gmeiner
2022-09-26 17:57 ` Guido Günther

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.