diff options
author | Justin Green <greenjustin@chromium.org> | 2022-11-16 14:33:35 -0500 |
---|---|---|
committer | Chun-Kuang Hu <chunkuang.hu@kernel.org> | 2022-11-23 16:18:30 +0000 |
commit | c410fa9b07c32cc69968ec83a148366d16c76dc4 (patch) | |
tree | 62fefbe09753812f6d360203a97bbb7ae3ccb020 /drivers/gpu/drm/mediatek/mtk_drm_plane.h | |
parent | 2847cd7e64038d8b554a98a07a4c0e6ec05e06b0 (diff) | |
download | linux-c410fa9b07c32cc69968ec83a148366d16c76dc4.tar.bz2 |
drm/mediatek: Add AFBC support to Mediatek DRM driver
Tested on MT8195 and confirmed both correct video output and improved DRAM
bandwidth performance.
Signed-off-by: Justin Green <greenjustin@chromium.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20221116193335.36320-1-greenjustin@google.com/
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Diffstat (limited to 'drivers/gpu/drm/mediatek/mtk_drm_plane.h')
-rw-r--r-- | drivers/gpu/drm/mediatek/mtk_drm_plane.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/mediatek/mtk_drm_plane.h b/drivers/gpu/drm/mediatek/mtk_drm_plane.h index 2d5ec66e3df1..8f39011cdbfc 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_plane.h +++ b/drivers/gpu/drm/mediatek/mtk_drm_plane.h @@ -10,12 +10,20 @@ #include <drm/drm_crtc.h> #include <linux/types.h> +#define AFBC_DATA_BLOCK_WIDTH 32 +#define AFBC_DATA_BLOCK_HEIGHT 8 +#define AFBC_HEADER_BLOCK_SIZE 16 +#define AFBC_HEADER_ALIGNMENT 1024 + struct mtk_plane_pending_state { bool config; bool enable; dma_addr_t addr; + dma_addr_t hdr_addr; unsigned int pitch; + unsigned int hdr_pitch; unsigned int format; + unsigned long long modifier; unsigned int x; unsigned int y; unsigned int width; |