- 04 2月, 2021 4 次提交
-
-
由 CK Hu 提交于
mtk mutex is used by DRM and MDP driver, and its function is SoC-specific, so move it to soc folder. Signed-off-by: NCK Hu <ck.hu@mediatek.com> Signed-off-by: NChun-Kuang Hu <chunkuang.hu@kernel.org> Acked-by: NMatthias Brugger <matthias.bgg@gmail.com>
-
由 CK Hu 提交于
Moving mutex resource management from client driver to mutex driver could prevent client drivers negotiating for resource management. Signed-off-by: NCK Hu <ck.hu@mediatek.com> Signed-off-by: NChun-Kuang Hu <chunkuang.hu@kernel.org>
-
由 CK Hu 提交于
mtk mutex is used by both drm and mdp driver, so change disp/ddp term to mutex to show that it's a common driver for drm and mdp. Signed-off-by: NCK Hu <ck.hu@mediatek.com> Signed-off-by: NChun-Kuang Hu <chunkuang.hu@kernel.org>
-
由 CK Hu 提交于
After mmsys routing function is moved out of mtk_drm_ddp.c, mtk_drm_ddp.c has only mtk mutex function, so rename it to match the function in it. Signed-off-by: NCK Hu <ck.hu@mediatek.com> Signed-off-by: NChun-Kuang Hu <chunkuang.hu@kernel.org>
-
- 07 1月, 2021 2 次提交
-
-
由 CK Hu 提交于
Some ddp component exist in both display path and other path, so sub driver should not directly call DRM driver's function. Moving mtk_ddp_comp_init() from sub driver to DRM driver to achieve this. Signed-off-by: NCK Hu <ck.hu@mediatek.com> Signed-off-by: NChun-Kuang Hu <chunkuang.hu@kernel.org>
-
由 CK Hu 提交于
Some ddp component exist in both display path and other path, so sub driver should not directly call crtc function. crtc register callback function to sub driver to prevent sub driver directly call crtc function. Signed-off-by: NCK Hu <ck.hu@mediatek.com> Signed-off-by: NChun-Kuang Hu <chunkuang.hu@kernel.org>
-
- 29 12月, 2020 1 次提交
-
-
由 CK Hu 提交于
Some ddp component exist in both display path and other path, so data belonged to sub driver should be moved into sub driver private data so it could be used for multiple path. clk info is one of sub driver data, so move it. Signed-off-by: NCK Hu <ck.hu@mediatek.com> Signed-off-by: NChun-Kuang Hu <chunkuang.hu@kernel.org>
-
- 28 11月, 2020 1 次提交
-
-
由 Chun-Kuang Hu 提交于
For each client driver, its timeout handler need to dump hardware register or its state machine information, and their way to detect timeout are also different, so remove timeout handler in helper function and let client driver implement its own timeout handler. Signed-off-by: NChun-Kuang Hu <chunkuang.hu@kernel.org> Acked-by: NMatthias Brugger <matthias.bgg@gmail.com> Link: https://lore.kernel.org/r/20201102000438.29225-1-chunkuang.hu@kernel.orgSigned-off-by: NMatthias Brugger <matthias.bgg@gmail.com>
-
- 18 11月, 2020 1 次提交
-
-
由 Lee Jones 提交于
This needs someone with in-depth knowledge of the driver to complete. Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/mediatek/mtk_drm_crtc.c:62: warning: Function parameter or member 'pending_needs_vblank' not described in 'mtk_drm_crtc' drivers/gpu/drm/mediatek/mtk_drm_crtc.c:62: warning: Function parameter or member 'event' not described in 'mtk_drm_crtc' drivers/gpu/drm/mediatek/mtk_drm_crtc.c:62: warning: Function parameter or member 'layer_nr' not described in 'mtk_drm_crtc' drivers/gpu/drm/mediatek/mtk_drm_crtc.c:62: warning: Function parameter or member 'pending_async_planes' not described in 'mtk_drm_crtc' drivers/gpu/drm/mediatek/mtk_drm_crtc.c:62: warning: Function parameter or member 'cmdq_client' not described in 'mtk_drm_crtc' drivers/gpu/drm/mediatek/mtk_drm_crtc.c:62: warning: Function parameter or member 'cmdq_event' not described in 'mtk_drm_crtc' drivers/gpu/drm/mediatek/mtk_drm_crtc.c:62: warning: Function parameter or member 'hw_lock' not described in 'mtk_drm_crtc' Cc: Chun-Kuang Hu <chunkuang.hu@kernel.org> Cc: Philipp Zabel <p.zabel@pengutronix.de> Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel@ffwll.ch> Cc: Matthias Brugger <matthias.bgg@gmail.com> Cc: dri-devel@lists.freedesktop.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mediatek@lists.infradead.org Signed-off-by: NLee Jones <lee.jones@linaro.org> Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20201116174112.1833368-12-lee.jones@linaro.org
-
- 10 11月, 2020 1 次提交
-
-
由 Maxime Ripard 提交于
Many drivers reference the crtc->pointer in order to get the current CRTC state in their atomic_begin or atomic_flush hooks, which would be the new CRTC state in the global atomic state since _swap_state happened when those hooks are run. Use the drm_atomic_get_new_crtc_state helper to get that state to make it more obvious. This was made using the coccinelle script below: @ crtc_atomic_func @ identifier helpers; identifier func; @@ ( static struct drm_crtc_helper_funcs helpers = { ..., .atomic_begin = func, ..., }; | static struct drm_crtc_helper_funcs helpers = { ..., .atomic_flush = func, ..., }; ) @@ identifier crtc_atomic_func.func; identifier crtc, state; symbol crtc_state; expression e; @@ func(struct drm_crtc *crtc, struct drm_atomic_state *state) { ... - struct tegra_dc_state *crtc_state = e; + struct tegra_dc_state *dc_state = e; <+... - crtc_state + dc_state ...+> } @@ identifier crtc_atomic_func.func; identifier crtc, state; symbol crtc_state; expression e; @@ func(struct drm_crtc *crtc, struct drm_atomic_state *state) { ... - struct mtk_crtc_state *crtc_state = e; + struct mtk_crtc_state *mtk_crtc_state = e; <+... - crtc_state + mtk_crtc_state ...+> } @ replaces_new_state @ identifier crtc_atomic_func.func; identifier crtc, state, crtc_state; @@ func(struct drm_crtc *crtc, struct drm_atomic_state *state) { ... - struct drm_crtc_state *crtc_state = crtc->state; + struct drm_crtc_state *crtc_state = drm_atomic_get_new_crtc_state(state, crtc); ... } @@ identifier crtc_atomic_func.func; identifier crtc, state, crtc_state; @@ func(struct drm_crtc *crtc, struct drm_atomic_state *state) { struct drm_crtc_state *crtc_state = drm_atomic_get_new_crtc_state(state, crtc); ... - crtc->state + crtc_state ... } @ adds_new_state @ identifier crtc_atomic_func.func; identifier crtc, state; @@ func(struct drm_crtc *crtc, struct drm_atomic_state *state) { + struct drm_crtc_state *crtc_state = drm_atomic_get_new_crtc_state(state, crtc); ... - crtc->state + crtc_state ... } @ include depends on adds_new_state || replaces_new_state @ @@ #include <drm/drm_atomic.h> @ no_include depends on !include && (adds_new_state || replaces_new_state) @ @@ + #include <drm/drm_atomic.h> #include <drm/...> Suggested-by: NVille Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: NMaxime Ripard <maxime@cerno.tech> Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com> Acked-by: NThomas Zimmermann <tzimmermann@suse.de> Cc: "James (Qian) Wang" <james.qian.wang@arm.com> Cc: Liviu Dudau <liviu.dudau@arm.com> Cc: Mihail Atanassov <mihail.atanassov@arm.com> Cc: Brian Starkey <brian.starkey@arm.com> Cc: Russell King <linux@armlinux.org.uk> Cc: Paul Cercueil <paul@crapouillou.net> Cc: Chun-Kuang Hu <chunkuang.hu@kernel.org> Cc: Philipp Zabel <p.zabel@pengutronix.de> Cc: Sandy Huang <hjc@rock-chips.com> Cc: "Heiko Stübner" <heiko@sntech.de> Cc: Thierry Reding <thierry.reding@gmail.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20201105164518.392891-1-maxime@cerno.tech
-
- 02 11月, 2020 1 次提交
-
-
由 Maxime Ripard 提交于
The current atomic helpers have either their object state being passed as an argument or the full atomic state. The former is the pattern that was done at first, before switching to the latter for new hooks or when it was needed. Let's start convert all the remaining helpers to provide a consistent interface, starting with the CRTC's atomic_begin and atomic_flush. The conversion was done using the coccinelle script below, built tested on all the drivers and actually tested on vc4. virtual report @@ struct drm_crtc_helper_funcs *FUNCS; identifier old_crtc_state, old_state; identifier crtc; identifier f; @@ f(struct drm_crtc_state *old_crtc_state) { ... struct drm_atomic_state *old_state = old_crtc_state->state; <... - FUNCS->atomic_begin(crtc, old_crtc_state); + FUNCS->atomic_begin(crtc, old_state); ...> } @@ struct drm_crtc_helper_funcs *FUNCS; identifier old_crtc_state, old_state; identifier crtc; identifier f; @@ f(struct drm_crtc_state *old_crtc_state) { ... struct drm_atomic_state *old_state = old_crtc_state->state; <... - FUNCS->atomic_flush(crtc, old_crtc_state); + FUNCS->atomic_flush(crtc, old_state); ...> } @@ struct drm_crtc_helper_funcs *FUNCS; struct drm_crtc *crtc; struct drm_crtc_state *crtc_state; identifier dev, state; identifier f; @@ f(struct drm_device *dev, struct drm_atomic_state *state, ...) { <... - FUNCS->atomic_begin(crtc, crtc_state); + FUNCS->atomic_begin(crtc, state); ...> } @@ struct drm_crtc_helper_funcs *FUNCS; struct drm_crtc *crtc; struct drm_crtc_state *crtc_state; identifier dev, state; identifier f; @@ f(struct drm_device *dev, struct drm_atomic_state *state, ...) { <... - FUNCS->atomic_flush(crtc, crtc_state); + FUNCS->atomic_flush(crtc, state); ...> } @@ identifier crtc, old_state; @@ struct drm_crtc_helper_funcs { ... - void (*atomic_begin)(struct drm_crtc *crtc, struct drm_crtc_state *old_state); + void (*atomic_begin)(struct drm_crtc *crtc, struct drm_atomic_state *state); ... - void (*atomic_flush)(struct drm_crtc *crtc, struct drm_crtc_state *old_state); + void (*atomic_flush)(struct drm_crtc *crtc, struct drm_atomic_state *state); ... } @ crtc_atomic_func @ identifier helpers; identifier func; @@ ( static struct drm_crtc_helper_funcs helpers = { ..., .atomic_begin = func, ..., }; | static struct drm_crtc_helper_funcs helpers = { ..., .atomic_flush = func, ..., }; ) @ ignores_old_state @ identifier crtc_atomic_func.func; identifier crtc, old_state; @@ void func(struct drm_crtc *crtc, struct drm_crtc_state *old_state) { ... when != old_state } @ adds_old_state depends on crtc_atomic_func && !ignores_old_state @ identifier crtc_atomic_func.func; identifier crtc, old_state; @@ void func(struct drm_crtc *crtc, struct drm_crtc_state *old_state) { + struct drm_crtc_state *old_state = drm_atomic_get_old_crtc_state(state, crtc); ... } @ depends on crtc_atomic_func @ identifier crtc_atomic_func.func; expression E; type T; @@ void func(...) { ... - T state = E; + T crtc_state = E; <+... - state + crtc_state ...+> } @ depends on crtc_atomic_func @ identifier crtc_atomic_func.func; type T; @@ void func(...) { ... - T state; + T crtc_state; <+... - state + crtc_state ...+> } @@ identifier old_state; identifier crtc; @@ void vc4_hvs_atomic_flush(struct drm_crtc *crtc, - struct drm_crtc_state *old_state + struct drm_atomic_state *state ) { + struct drm_crtc_state *old_state = drm_atomic_get_old_crtc_state(state, crtc); ... } @@ identifier old_state; identifier crtc; @@ void vc4_hvs_atomic_flush(struct drm_crtc *crtc, - struct drm_crtc_state *old_state + struct drm_atomic_state *state ); @@ identifier old_state; identifier crtc; @@ void vmw_du_crtc_atomic_begin(struct drm_crtc *crtc, - struct drm_crtc_state *old_state + struct drm_atomic_state *state ) { ... } @@ identifier old_state; identifier crtc; @@ void vmw_du_crtc_atomic_begin(struct drm_crtc *crtc, - struct drm_crtc_state *old_state + struct drm_atomic_state *state ); @@ identifier old_state; identifier crtc; @@ void vmw_du_crtc_atomic_flush(struct drm_crtc *crtc, - struct drm_crtc_state *old_state + struct drm_atomic_state *state ) { ... } @@ identifier old_state; identifier crtc; @@ void vmw_du_crtc_atomic_flush(struct drm_crtc *crtc, - struct drm_crtc_state *old_state + struct drm_atomic_state *state ); @ depends on crtc_atomic_func @ identifier crtc_atomic_func.func; identifier old_state; identifier crtc; @@ void func(struct drm_crtc *crtc, - struct drm_crtc_state *old_state + struct drm_atomic_state *state ) { ... } @ include depends on adds_old_state @ @@ #include <drm/drm_atomic.h> @ no_include depends on !include && adds_old_state @ @@ + #include <drm/drm_atomic.h> #include <drm/...> Signed-off-by: NMaxime Ripard <maxime@cerno.tech> Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com> Acked-by: NDaniel Vetter <daniel.vetter@ffwll.ch> Acked-by: NThomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/20201028123222.1732139-2-maxime@cerno.tech
-
- 09 10月, 2020 1 次提交
-
-
由 Maxime Ripard 提交于
If the CRTC driver ever needs to access the full DRM state, it can't do so at atomic_enable / atomic_disable time since drm_atomic_helper_swap_state will have cleared the pointer from the struct drm_crtc_state to the struct drm_atomic_state before calling those hooks. In order to allow that, let's pass the full DRM state to atomic_enable and atomic_disable. The conversion was done using the coccinelle script below, built tested on all the drivers and actually tested on vc4. virtual report @@ struct drm_crtc_helper_funcs *FUNCS; identifier dev, state; identifier crtc, crtc_state; @@ disable_outputs(struct drm_device *dev, struct drm_atomic_state *state) { <... - FUNCS->atomic_disable(crtc, crtc_state); + FUNCS->atomic_disable(crtc, state); ...> } @@ struct drm_crtc_helper_funcs *FUNCS; identifier dev, state; identifier crtc, crtc_state; @@ drm_atomic_helper_commit_modeset_enables(struct drm_device *dev, struct drm_atomic_state *state) { <... - FUNCS->atomic_enable(crtc, crtc_state); + FUNCS->atomic_enable(crtc, state); ...> } @@ identifier crtc, old_state; @@ struct drm_crtc_helper_funcs { ... - void (*atomic_enable)(struct drm_crtc *crtc, struct drm_crtc_state *old_state); + void (*atomic_enable)(struct drm_crtc *crtc, struct drm_atomic_state *state); ... - void (*atomic_disable)(struct drm_crtc *crtc, struct drm_crtc_state *old_state); + void (*atomic_disable)(struct drm_crtc *crtc, struct drm_atomic_state *state); ... } @ crtc_atomic_func @ identifier helpers; identifier func; @@ ( static struct drm_crtc_helper_funcs helpers = { ..., .atomic_enable = func, ..., }; | static struct drm_crtc_helper_funcs helpers = { ..., .atomic_disable = func, ..., }; ) @ ignores_old_state @ identifier crtc_atomic_func.func; identifier crtc, old_state; @@ void func(struct drm_crtc *crtc, struct drm_crtc_state *old_state) { ... when != old_state } @ adds_old_state depends on crtc_atomic_func && !ignores_old_state @ identifier crtc_atomic_func.func; identifier crtc, old_state; @@ void func(struct drm_crtc *crtc, struct drm_crtc_state *old_state) { + struct drm_crtc_state *old_state = drm_atomic_get_old_crtc_state(state, crtc); ... } @ depends on crtc_atomic_func @ identifier crtc_atomic_func.func; expression E; type T; @@ void func(...) { ... - T state = E; + T crtc_state = E; <+... - state + crtc_state ...+> } @ depends on crtc_atomic_func @ identifier crtc_atomic_func.func; type T; @@ void func(...) { ... - T state; + T crtc_state; <+... - state + crtc_state ...+> } @ depends on crtc_atomic_func @ identifier crtc_atomic_func.func; identifier old_state; identifier crtc; @@ void func(struct drm_crtc *crtc, - struct drm_crtc_state *old_state + struct drm_atomic_state *state ) { ... } @ include depends on adds_old_state @ @@ #include <drm/drm_atomic.h> @ no_include depends on !include && adds_old_state @ @@ + #include <drm/drm_atomic.h> #include <drm/...> Signed-off-by: NMaxime Ripard <maxime@cerno.tech> Acked-by: NDaniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/845aa10ef171fc0ea060495efef142a0c13f7870.1602161031.git-series.maxime@cerno.tech
-
- 25 9月, 2020 2 次提交
-
-
由 Dennis YC Hsieh 提交于
No need to clear event again since event always clear before wait. This fix depend on patch: "soc: mediatek: cmdq: add clear option in cmdq_pkt_wfe api" Fixes: 2f965be7 ("drm/mediatek: apply CMDQ control flow") Signed-off-by: NDennis YC Hsieh <dennis-yc.hsieh@mediatek.com> Reviewed-by: NBibby Hsieh <bibby.hsieh@mediatek.com> Acked-by: NChun-Kuang Hu <chunkuang.hu@kernel.org> Link: https://lore.kernel.org/r/1594136714-11650-10-git-send-email-dennis-yc.hsieh@mediatek.comSigned-off-by: NMatthias Brugger <matthias.bgg@gmail.com>
-
由 Dennis YC Hsieh 提交于
Add clear parameter to let client decide if event should be clear to 0 after GCE receive it. Signed-off-by: NDennis YC Hsieh <dennis-yc.hsieh@mediatek.com> Acked-by: NChun-Kuang Hu <chunkuang.hu@kernel.org> Link: https://lore.kernel.org/r/1594136714-11650-9-git-send-email-dennis-yc.hsieh@mediatek.com [mb: fix commit message] Signed-off-by: NMatthias Brugger <matthias.bgg@gmail.com>
-
- 17 9月, 2020 1 次提交
-
-
由 Chun-Kuang Hu 提交于
Even though cmdq client is created successfully, without the cmdq event, cmdq could not work correctly, so use CPU when fail to get cmdq event. Fixes: 60fa8c13 ("drm/mediatek: Move gce event property to mutex device node") Signed-off-by: NChun-Kuang Hu <chunkuang.hu@kernel.org>
-
- 03 7月, 2020 1 次提交
-
-
由 Daniel Vetter 提交于
Now also comes with the added benefit of doing a drm_crtc_vblank_off(), which means vblank state isn't ill-defined and fail-y at driver load before the first modeset on each crtc. Acked-by: NChun-Kuang Hu <chunkuang.hu@kernel.org> Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com> Cc: Chun-Kuang Hu <chunkuang.hu@kernel.org> Cc: Philipp Zabel <p.zabel@pengutronix.de> Cc: Matthias Brugger <matthias.bgg@gmail.com> Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mediatek@lists.infradead.org Link: https://patchwork.freedesktop.org/patch/msgid/20200612160056.2082681-4-daniel.vetter@ffwll.ch
-
- 27 6月, 2020 2 次提交
-
-
由 Enric Balletbo i Serra 提交于
Equivalent information can be nowadays obtained using function tracer. Signed-off-by: NEnric Balletbo i Serra <enric.balletbo@collabora.com> Reviewed-by: NCK Hu <ck.hu@mediatek.com> Signed-off-by: NChun-Kuang Hu <chunkuang.hu@kernel.org>
-
由 Hsin-Yi Wang 提交于
drm device is now probed from mmsys. We need to use mmsys device to get gce nodes. Fix following errors: [ 0.740068] mediatek-drm mediatek-drm.1.auto: error -2 can't parse gce-client-reg property (0) [ 0.748721] mediatek-drm mediatek-drm.1.auto: error -2 can't parse gce-client-reg property (0) ... [ 2.659645] mediatek-drm mediatek-drm.1.auto: failed to request channel [ 2.666270] mediatek-drm mediatek-drm.1.auto: failed to request channel Fixes: 667c7692 ("soc / drm: mediatek: Fix mediatek-drm device probing") Signed-off-by: NHsin-Yi Wang <hsinyi@chromium.org> Reviewed-by: NEnric Balletbo i Serra <enric.balletbo@collabora.com> Tested-by: NEnric Balletbo i Serra <enric.balletbo@collabora.com> Signed-off-by: NChun-Kuang Hu <chunkuang.hu@kernel.org>
-
- 22 6月, 2020 1 次提交
-
-
由 Dennis YC Hsieh 提交于
Export finalize function to client which helps append eoc and jump command to pkt. Let client decide call finalize or not. Signed-off-by: NDennis YC Hsieh <dennis-yc.hsieh@mediatek.com> Reviewed-by: NCK Hu <ck.hu@mediatek.com> Acked-by: NChun-Kuang Hu <chunkuang.hu@kernel.org> Link: https://lore.kernel.org/r/1592749115-24158-9-git-send-email-dennis-yc.hsieh@mediatek.comSigned-off-by: NMatthias Brugger <matthias.bgg@gmail.com>
-
- 27 5月, 2020 1 次提交
-
-
由 Ville Syrjälä 提交于
Get rid of mode->vrefresh and just calculate it on demand. Saves a bit of space and avoids the cached value getting out of sync with reality. Mostly done with cocci, with the following manual fixups: - Remove the now empty loop in drm_helper_probe_single_connector_modes() - Fix __MODE() macro in ch7006_mode.c - Fix DRM_MODE_ARG() macro in drm_modes.h - Remove leftover comment from samsung_s6d16d0_mode - Drop the TODO @@ @@ struct drm_display_mode { ... - int vrefresh; ... }; @@ identifier N; expression E; @@ struct drm_display_mode N = { - .vrefresh = E }; @@ identifier N; expression E; @@ struct drm_display_mode N[...] = { ..., { - .vrefresh = E } ,... }; @@ expression E; @@ { DRM_MODE(...), - .vrefresh = E, } @@ identifier M, R; @@ int drm_mode_vrefresh(const struct drm_display_mode *M) { ... - if (M->vrefresh > 0) - R = M->vrefresh; - else if (...) { ... } ... } @@ struct drm_display_mode *p; expression E; @@ ( - p->vrefresh = E; | - p->vrefresh + drm_mode_vrefresh(p) ) @@ struct drm_display_mode s; expression E; @@ ( - s.vrefresh = E; | - s.vrefresh + drm_mode_vrefresh(&s) ) @@ expression E; @@ - drm_mode_vrefresh(E) ? drm_mode_vrefresh(E) : drm_mode_vrefresh(E) + drm_mode_vrefresh(E) @find_substruct@ identifier X; identifier S; @@ struct X { ... struct drm_display_mode S; ... }; @@ identifier find_substruct.S; expression E; identifier I; @@ { .S = { - .vrefresh = E } } @@ identifier find_substruct.S; identifier find_substruct.X; expression E; identifier I; @@ struct X I[...] = { ..., .S = { - .vrefresh = E } ,... }; v2: Drop TODO v3: Rebase v4: Rebase Cc: Andrzej Hajda <a.hajda@samsung.com> Cc: Neil Armstrong <narmstrong@baylibre.com> Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com> Cc: Jonas Karlman <jonas@kwiboo.se> Cc: Jernej Skrabec <jernej.skrabec@siol.net> Cc: Inki Dae <inki.dae@samsung.com> Cc: Joonyoung Shim <jy0922.shim@samsung.com> Cc: Seung-Woo Kim <sw0312.kim@samsung.com> Cc: Kyungmin Park <kyungmin.park@samsung.com> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: CK Hu <ck.hu@mediatek.com> Cc: Philipp Zabel <p.zabel@pengutronix.de> Cc: Ben Skeggs <bskeggs@redhat.com> Cc: Thierry Reding <thierry.reding@gmail.com> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Jerry Han <hanxu5@huaqin.corp-partner.google.com> Cc: Icenowy Zheng <icenowy@aosc.io> Cc: Jagan Teki <jagan@amarulasolutions.com> Cc: Stefan Mavrodiev <stefan@olimex.com> Cc: Robert Chiras <robert.chiras@nxp.com> Cc: "Guido Günther" <agx@sigxcpu.org> Cc: Purism Kernel Team <kernel@puri.sm> Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org> Cc: Vincent Abriou <vincent.abriou@st.com> Cc: VMware Graphics <linux-graphics-maintainer@vmware.com> Cc: Thomas Hellstrom <thellstrom@vmware.com> Cc: linux-amlogic@lists.infradead.org Cc: nouveau@lists.freedesktop.org Reviewed-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: NEmil Velikov <emil.velikov@collabora.com> Reviewed-by: NSam Ravnborg <sam@ravnborg.org> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200428171940.19552-4-ville.syrjala@linux.intel.com
-
- 13 4月, 2020 1 次提交
-
-
由 Enric Balletbo i Serra 提交于
Provide a mtk_mmsys_ddp_connect() and mtk_mmsys_disconnect() functions to replace mtk_ddp_add_comp_to_path() and mtk_ddp_remove_comp_from_path(). Those functions will allow DRM driver and others to control the data path routing. Signed-off-by: NEnric Balletbo i Serra <enric.balletbo@collabora.com> Reviewed-by: NMatthias Brugger <matthias.bgg@gmail.com> Reviewed-by: NCK Hu <ck.hu@mediatek.com> Acked-by: NCK Hu <ck.hu@mediatek.com> Tested-by: NAnders Roxell <anders.roxell@linaro.org> Reviewed-by: NChun-Kuang Hu <chunkuang.hu@kernel.org> Signed-off-by: NMatthias Brugger <matthias.bgg@gmail.com>
-
- 18 2月, 2020 2 次提交
-
-
由 Bibby Hsieh 提交于
Mediatek CMDQ driver removed atomic parameter and implementation related to atomic. DRM driver need to make sure previous message done or be aborted before we send next message. If previous message is still waiting for event, it means the setting hasn't been updated into display hardware register, we can abort the message and send next message to update the newest setting into display hardware. If previous message already started, we have to wait it until transmission has been completed. So we flush mbox client before we send new message to controller driver. Signed-off-by: NBibby Hsieh <bibby.hsieh@mediatek.com> Signed-off-by: NCK Hu <ck.hu@mediatek.com>
-
由 Bibby Hsieh 提交于
According mtk hardware design, stream_done0 and stream_done1 are generated by mutex, so we move gce event property to mutex device mode. Signed-off-by: NBibby Hsieh <bibby.hsieh@mediatek.com> Signed-off-by: NCK Hu <ck.hu@mediatek.com>
-
- 11 2月, 2020 2 次提交
-
-
由 Sean Paul 提交于
Currently the cursor is placed on the first overlay plane, which means it will be at the bottom of the stack when the hw does the compositing with anything other than primary plane. Since mtk doesn't support plane zpos, change the cursor location to the top-most plane. Signed-off-by: NSean Paul <seanpaul@chromium.org> Signed-off-by: NCK Hu <ck.hu@mediatek.com>
-
由 Evan Benn 提交于
The cursor and primary planes were hard coded. Now search for them for passing to drm_crtc_init_with_planes Signed-off-by: NEvan Benn <evanbenn@chromium.org> Reviewed-by: NSean Paul <seanpaul@chromium.org> Signed-off-by: NCK Hu <ck.hu@mediatek.com>
-
- 10 1月, 2020 2 次提交
-
-
由 Yongqiang Niu 提交于
Add ctm property support Signed-off-by: NYongqiang Niu <yongqiang.niu@mediatek.com> Signed-off-by: NHsin-Yi Wang <hsinyi@chromium.org> Signed-off-by: NCK Hu <ck.hu@mediatek.com>
-
由 Yongqiang Niu 提交于
If there is no gamma function in the crtc display path, don't add gamma property for crtc Fixes: 2f3f4dda ("drm/mediatek: Add gamma correction.") Signed-off-by: NYongqiang Niu <yongqiang.niu@mediatek.com> Signed-off-by: NHsin-Yi Wang <hsinyi@chromium.org> Signed-off-by: NCK Hu <ck.hu@mediatek.com>
-
- 09 1月, 2020 2 次提交
-
-
由 Bibby Hsieh 提交于
In some Mediatek SoC, there is no "shadow" registers for performaing an atomic video mode set or page flip at vblank/vsync. The CMDQ (Commend Queue) is used to help update all relevant display controller registers with critical time limation. Signed-off-by: NYT Shen <yt.shen@mediatek.com> Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de> Signed-off-by: NBibby Hsieh <bibby.hsieh@mediatek.com> Signed-off-by: NYongqiang Niu <yongqiang.niu@mediatek.com> Signed-off-by: NCK Hu <ck.hu@mediatek.com>
-
由 Bibby Hsieh 提交于
The CMDQ (Command Queue) in some Mediatek SoC is used to help update all relevant display controller registers with critical time limation. This patch add cmdq interface in ddp_comp interface, let all ddp_comp interface can support cpu/cmdq function at the same time. Signed-off-by: NYT Shen <yt.shen@mediatek.com> Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de> Signed-off-by: NBibby Hsieh <bibby.hsieh@mediatek.com> Signed-off-by: NYongqiang Niu <yongqiang.niu@mediatek.com> Signed-off-by: NCK Hu <ck.hu@mediatek.com>
-
- 20 12月, 2019 5 次提交
-
-
由 Bibby Hsieh 提交于
Under shadow register case, we do not disable all the plane before disable all the hardwares. Fix it. Fixes: 9dc84e98 ("drm/mediatek: add shadow register support") Signed-off-by: NBibby Hsieh <bibby.hsieh@mediatek.com> Signed-off-by: NCK Hu <ck.hu@mediatek.com>
-
由 Bibby Hsieh 提交于
Support to async updates of cursors by using the new atomic interface for that. Signed-off-by: NBibby Hsieh <bibby.hsieh@mediatek.com> Signed-off-by: NCK Hu <ck.hu@mediatek.com>
-
由 Bibby Hsieh 提交于
The driver currently handles vblank events only when updating planes on an already enabled CRTC. The atomic update API however allows requesting an event when enabling or disabling a CRTC. This currently leads to event objects being leaked in the kernel and to events not being sent out. Fix it. Signed-off-by: NBibby Hsieh <bibby.hsieh@mediatek.com> Signed-off-by: NCK Hu <ck.hu@mediatek.com>
-
由 Yongqiang Niu 提交于
The original logic is ok for primary display, but will not find out component for external display. For example, plane->index is 6 for external display, but there are only 2 layer nr in external display, and this condition will never happen: if (plane->index < (count + mtk_ddp_comp_layer_nr(comp))) Fix this by using the offset of the plane to mtk_crtc->planes as index, instead of plane->index. Fixes: d6b53f68 ("drm/mediatek: Add helper to get component for a plane") Signed-off-by: NYongqiang Niu <yongqiang.niu@mediatek.com> Signed-off-by: NPi-Hsun Shih <pihsun@chromium.org> Signed-off-by: NCK Hu <ck.hu@mediatek.com>
-
由 Pi-Hsun Shih 提交于
The mtk_drm_ddp_comp_for_plane can return NULL, but the usage doesn't check for it. Add check for it. Fixes: d6b53f68 ("drm/mediatek: Add helper to get component for a plane") Signed-off-by: NPi-Hsun Shih <pihsun@chromium.org> Signed-off-by: NCK Hu <ck.hu@mediatek.com>
-
- 09 12月, 2019 2 次提交
-
-
由 Yongqiang Niu 提交于
The original logic is ok for primary display, but will not find out component for external display. For example, plane->index is 6 for external display, but there are only 2 layer nr in external display, and this condition will never happen: if (plane->index < (count + mtk_ddp_comp_layer_nr(comp))) Fix this by using the offset of the plane to mtk_crtc->planes as index, instead of plane->index. Fixes: d6b53f68 ("drm/mediatek: Add helper to get component for a plane") Signed-off-by: NYongqiang Niu <yongqiang.niu@mediatek.com> Signed-off-by: NPi-Hsun Shih <pihsun@chromium.org> Signed-off-by: NCK Hu <ck.hu@mediatek.com>
-
由 Pi-Hsun Shih 提交于
The mtk_drm_ddp_comp_for_plane can return NULL, but the usage doesn't check for it. Add check for it. Fixes: d6b53f68 ("drm/mediatek: Add helper to get component for a plane") Signed-off-by: NPi-Hsun Shih <pihsun@chromium.org> Signed-off-by: NCK Hu <ck.hu@mediatek.com>
-
- 06 11月, 2019 4 次提交
-
-
由 Sean Paul 提交于
This patch adds the ability for components to expose supported rotations which will be exposed to userspace via a plane rotation property. No functional changes in this patch. Signed-off-by: NSean Paul <seanpaul@chromium.org> Signed-off-by: NCK Hu <ck.hu@mediatek.com>
-
由 Sean Paul 提交于
This allows components to implement a .layer_check callback for their layers which is called during atomic_check. Signed-off-by: NSean Paul <seanpaul@chromium.org> Signed-off-by: NCK Hu <ck.hu@mediatek.com>
-
由 Sean Paul 提交于
Instead of hard-coding which components have planes, add a helper function to walk the components and map a plane index to a component layer. Signed-off-by: NSean Paul <seanpaul@chromium.org> Signed-off-by: NCK Hu <ck.hu@mediatek.com>
-
由 Sean Paul 提交于
Add a couple of functions which enumerate the number of planes for a component and initialize the planes for a component. No functional changes in this patch, but it will allow us to selectively support rotation if the component supports it. Signed-off-by: NSean Paul <seanpaul@chromium.org> Signed-off-by: NCK Hu <ck.hu@mediatek.com>
-