Merge tag 'mediatek-drm-fixes-20251105' of https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux into drm-fixes
Mediatek DRM Fixes - 20251105 1. Disable AFBC support on Mediatek DRM driver 2. Add pm_runtime support for GCE power control Signed-off-by: Dave Airlie <airlied@redhat.com> From: Chun-Kuang Hu <chunkuang.hu@kernel.org> Link: https://patch.msgid.link/20251105151443.3909-1-chunkuang.hu@kernel.org
This commit is contained in:
@@ -283,6 +283,10 @@ static void ddp_cmdq_cb(struct mbox_client *cl, void *mssg)
|
||||
unsigned int i;
|
||||
unsigned long flags;
|
||||
|
||||
/* release GCE HW usage and start autosuspend */
|
||||
pm_runtime_mark_last_busy(cmdq_cl->chan->mbox->dev);
|
||||
pm_runtime_put_autosuspend(cmdq_cl->chan->mbox->dev);
|
||||
|
||||
if (data->sta < 0)
|
||||
return;
|
||||
|
||||
@@ -618,6 +622,9 @@ static void mtk_crtc_update_config(struct mtk_crtc *mtk_crtc, bool needs_vblank)
|
||||
mtk_crtc->config_updating = false;
|
||||
spin_unlock_irqrestore(&mtk_crtc->config_lock, flags);
|
||||
|
||||
if (pm_runtime_resume_and_get(mtk_crtc->cmdq_client.chan->mbox->dev) < 0)
|
||||
goto update_config_out;
|
||||
|
||||
mbox_send_message(mtk_crtc->cmdq_client.chan, cmdq_handle);
|
||||
mbox_client_txdone(mtk_crtc->cmdq_client.chan, 0);
|
||||
goto update_config_out;
|
||||
|
||||
@@ -21,9 +21,6 @@
|
||||
|
||||
static const u64 modifiers[] = {
|
||||
DRM_FORMAT_MOD_LINEAR,
|
||||
DRM_FORMAT_MOD_ARM_AFBC(AFBC_FORMAT_MOD_BLOCK_SIZE_32x8 |
|
||||
AFBC_FORMAT_MOD_SPLIT |
|
||||
AFBC_FORMAT_MOD_SPARSE),
|
||||
DRM_FORMAT_MOD_INVALID,
|
||||
};
|
||||
|
||||
@@ -71,26 +68,7 @@ static bool mtk_plane_format_mod_supported(struct drm_plane *plane,
|
||||
uint32_t format,
|
||||
uint64_t modifier)
|
||||
{
|
||||
if (modifier == DRM_FORMAT_MOD_LINEAR)
|
||||
return true;
|
||||
|
||||
if (modifier != DRM_FORMAT_MOD_ARM_AFBC(
|
||||
AFBC_FORMAT_MOD_BLOCK_SIZE_32x8 |
|
||||
AFBC_FORMAT_MOD_SPLIT |
|
||||
AFBC_FORMAT_MOD_SPARSE))
|
||||
return false;
|
||||
|
||||
if (format != DRM_FORMAT_XRGB8888 &&
|
||||
format != DRM_FORMAT_ARGB8888 &&
|
||||
format != DRM_FORMAT_BGRX8888 &&
|
||||
format != DRM_FORMAT_BGRA8888 &&
|
||||
format != DRM_FORMAT_ABGR8888 &&
|
||||
format != DRM_FORMAT_XBGR8888 &&
|
||||
format != DRM_FORMAT_RGB888 &&
|
||||
format != DRM_FORMAT_BGR888)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
return modifier == DRM_FORMAT_MOD_LINEAR;
|
||||
}
|
||||
|
||||
static void mtk_plane_destroy_state(struct drm_plane *plane,
|
||||
|
||||
Reference in New Issue
Block a user