Rename mtk_drm_* to mtk_*
Subsystems (4)
v3 cover Rename mtk_drm_* to mtk_*
From: Hsiao Chien Sung <[email protected]>
Rename some unnecessary "mtk_drm_*" to "mtk_*" because:
- Lower the matches when searching the native drm_* codes
- Reduce the code
Changes in v3:
- Fix typo and patch error
Changes in v2:
- Sort header files alphabetically
- Seperate patches for renaming .c files to avoid conflicts
This series is based on c958e86e9cc1b of mediatek-drm-next.
Hsiao Chien Sung (14):
drm/mediatek: Rename "mtk_drm_crtc" to "mtk_crtc" drm/mediatek: Rename "mtk_drm_ddp_comp" to "mtk_ddp_comp" drm/mediatek: Rename "mtk_drm_plane" to "mtk_plane" drm/mediatek: Rename "mtk_drm_gem" to "mtk_gem" drm/mediatek: Rename "mtk_drm_hdmi" to "mtk_hdmi" drm/mediatek: Rename files "mtk_drm_crtc.h" to "mtk_crtc.h" drm/mediatek: Rename files "mtk_drm_crtc.c" to "mtk_crtc.c" drm/mediatek: Rename files "mtk_drm_ddp_comp.h" to "mtk_ddp_comp.h" drm/mediatek: Rename files "mtk_drm_ddp_comp.c" to "mtk_ddp_comp.c" drm/mediatek: Rename files "mtk_drm_plane.h" to "mtk_plane.h" drm/mediatek: Rename files "mtk_drm_plane.c" to "mtk_plane.c" drm/mediatek: Rename files "mtk_drm_gem.h" to "mtk_gem.h" drm/mediatek: Rename files "mtk_drm_gem.c" to "mtk_gem.c" drm/mediatek: Rename mtk_ddp_comp functions
drivers/gpu/drm/mediatek/Makefile | 12 +-
.../mediatek/{mtk_drm_crtc.c => mtk_crtc.c} | 213 +++++++++---------
drivers/gpu/drm/mediatek/mtk_crtc.h | 28 +++
.../{mtk_drm_ddp_comp.c => mtk_ddp_comp.c} | 51 +++--
.../{mtk_drm_ddp_comp.h => mtk_ddp_comp.h} | 9 +-
drivers/gpu/drm/mediatek/mtk_disp_aal.c | 4 +-
drivers/gpu/drm/mediatek/mtk_disp_ccorr.c | 4 +-
drivers/gpu/drm/mediatek/mtk_disp_color.c | 4 +-
drivers/gpu/drm/mediatek/mtk_disp_drv.h | 2 +-
drivers/gpu/drm/mediatek/mtk_disp_gamma.c | 4 +-
drivers/gpu/drm/mediatek/mtk_disp_merge.c | 2 +-
drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 4 +-
.../gpu/drm/mediatek/mtk_disp_ovl_adaptor.c | 4 +-
drivers/gpu/drm/mediatek/mtk_disp_rdma.c | 4 +-
drivers/gpu/drm/mediatek/mtk_dpi.c | 4 +-
drivers/gpu/drm/mediatek/mtk_drm_crtc.h | 30 ---
drivers/gpu/drm/mediatek/mtk_drm_drv.c | 32 +--
drivers/gpu/drm/mediatek/mtk_drm_drv.h | 4 +-
drivers/gpu/drm/mediatek/mtk_dsi.c | 6 +-
drivers/gpu/drm/mediatek/mtk_ethdr.c | 4 +-
.../drm/mediatek/{mtk_drm_gem.c => mtk_gem.c} | 65 +++---
.../drm/mediatek/{mtk_drm_gem.h => mtk_gem.h} | 23 +-
drivers/gpu/drm/mediatek/mtk_hdmi.c | 14 +-
drivers/gpu/drm/mediatek/mtk_padding.c | 4 +-
.../mediatek/{mtk_drm_plane.c => mtk_plane.c} | 26 +--
.../mediatek/{mtk_drm_plane.h => mtk_plane.h} | 4 +-
26 files changed, 275 insertions(+), 286 deletions(-)
rename drivers/gpu/drm/mediatek/{mtk_drm_crtc.c => mtk_crtc.c} (82%)
create mode 100644 drivers/gpu/drm/mediatek/mtk_crtc.h
rename drivers/gpu/drm/mediatek/{mtk_drm_ddp_comp.c => mtk_ddp_comp.c} (94%)
rename drivers/gpu/drm/mediatek/{mtk_drm_ddp_comp.h => mtk_ddp_comp.h} (98%)
delete mode 100644 drivers/gpu/drm/mediatek/mtk_drm_crtc.h
rename drivers/gpu/drm/mediatek/{mtk_drm_gem.c => mtk_gem.c} (76%)
rename drivers/gpu/drm/mediatek/{mtk_drm_gem.h => mtk_gem.h} (62%)
rename drivers/gpu/drm/mediatek/{mtk_drm_plane.c => mtk_plane.c} (94%)
rename drivers/gpu/drm/mediatek/{mtk_drm_plane.h => mtk_plane.h} (95%)--
2.18.0
PATCH v3 1/14 drm/mediatek: Rename "mtk_drm_crtc" to "mtk_crtc"
From: Hsiao Chien Sung <[email protected]>
Rename all "mtk_drm_crtc" to "mtk_crtc" due to the following benefits:
- Lower the matches when searching the native drm_crtc* codes
- Reduce the code size
--- drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 189 +++++++++++------------ drivers/gpu/drm/mediatek/mtk_drm_crtc.h | 28 ++-- drivers/gpu/drm/mediatek/mtk_drm_drv.c | 18 +-- drivers/gpu/drm/mediatek/mtk_drm_drv.h | 2 +- drivers/gpu/drm/mediatek/mtk_drm_plane.c | 10 +- drivers/gpu/drm/mediatek/mtk_dsi.c | 2 +- 6 files changed, 119 insertions(+), 130 deletions(-)
drivers/gpu/drm/mediatek/mtk_drm_crtc.c +90 -99
@@ -26,7 +26,7 @@#include "mtk_drm_plane.h" /* -* struct mtk_drm_crtc - MediaTek specific crtc structure. +* struct mtk_crtc - MediaTek specific crtc structure. * @base: crtc object. * @enabled: records whether crtc_enable succeeded * @planes: array of 4 drm_plane structures, one for each overlay plane
@@ -38,7 +38,7 @@* * TODO: Needs update: this header is missing a bunch of member descriptions. */ -struct mtk_drm_crtc { +struct mtk_crtc {struct drm_crtc base;bool enabled;
@@ -80,9 +80,9 @@ struct mtk_crtc_state {unsigned int pending_vrefresh; }; -static inline struct mtk_drm_crtc *to_mtk_crtc (struct drm_crtc *c) +static inline struct mtk_crtc *to_mtk_crtc (struct drm_crtc *c) { - return container_of(c, struct mtk_drm_crtc, base); + return container_of(c, struct mtk_crtc, base); }static inline struct mtk_crtc_state *to_mtk_crtc_state (struct drm_crtc_state *s)
@@ -90,7 +90,7 @@ static inline struct mtk_crtc_state *to_mtk_crtc_state(struct drm_crtc_state *s) return container_of(s, struct mtk_crtc_state, base); } -static void mtk_drm_crtc_finish_page_flip (struct mtk_drm_crtc *mtk_crtc) +static void mtk_crtc_finish_page_flip (struct mtk_crtc *mtk_crtc) {struct drm_crtc *crtc = &mtk_crtc->base;unsigned long flags;
@@ -104,11 +104,11 @@ static void mtk_drm_crtc_finish_page_flip(struct mtk_drm_crtc *mtk_crtc) } } -static void mtk_drm_finish_page_flip (struct mtk_drm_crtc *mtk_crtc) +static void mtk_drm_finish_page_flip (struct mtk_crtc *mtk_crtc) {drm_crtc_handle_vblank (&mtk_crtc->base);if (!mtk_crtc->config_updating && mtk_crtc->pending_needs_vblank) { -mtk_drm_crtc_finish_page_flip (mtk_crtc); +mtk_crtc_finish_page_flip (mtk_crtc); mtk_crtc->pending_needs_vblank = false; } }
@@ -151,9 +151,9 @@ static void mtk_drm_cmdq_pkt_destroy(struct cmdq_pkt *pkt) }#endif -static void mtk_drm_crtc_destroy (struct drm_crtc *crtc) +static void mtk_crtc_destroy (struct drm_crtc *crtc) { -struct mtk_drm_crtc *mtk_crtc =to_mtk_crtc (crtc); +struct mtk_crtc *mtk_crtc =to_mtk_crtc (crtc);int i;mtk_mutex_put (mtk_crtc->mutex);
@@ -176,7 +176,7 @@ static void mtk_drm_crtc_destroy(struct drm_crtc *crtc)drm_crtc_cleanup (crtc); } -static void mtk_drm_crtc_reset (struct drm_crtc *crtc) +static void mtk_crtc_reset (struct drm_crtc *crtc) {struct mtk_crtc_state *state;
@@ -191,7 +191,7 @@ static void mtk_drm_crtc_reset(struct drm_crtc *crtc)__drm_atomic_helper_crtc_reset (crtc, &state->base); } -static struct drm_crtc_state *mtk_drm_crtc_duplicate_state (struct drm_crtc *crtc) +static struct drm_crtc_state *mtk_crtc_duplicate_state (struct drm_crtc *crtc) {struct mtk_crtc_state *state;
@@ -208,18 +208,17 @@ static struct drm_crtc_state *mtk_drm_crtc_duplicate_state(struct drm_crtc *crtcreturn &state->base; } -static void mtk_drm_crtc_destroy_state (struct drm_crtc *crtc, -struct drm_crtc_state *state) +static void mtk_crtc_destroy_state (struct drm_crtc *crtc, +struct drm_crtc_state *state) {__drm_atomic_helper_crtc_destroy_state (state);kfree (to_mtk_crtc_state (state)); }static enum drm_mode_status -mtk_drm_crtc_mode_valid (struct drm_crtc *crtc, -const struct drm_display_mode *mode) +mtk_crtc_mode_valid (struct drm_crtc *crtc,const struct drm_display_mode *mode) { -struct mtk_drm_crtc *mtk_crtc =to_mtk_crtc (crtc); +struct mtk_crtc *mtk_crtc =to_mtk_crtc (crtc);enum drm_mode_status status =MODE_OK ;int i;
@@ -231,15 +230,15 @@ mtk_drm_crtc_mode_valid(struct drm_crtc *crtc,return status; } -static bool mtk_drm_crtc_mode_fixup (struct drm_crtc *crtc, -const struct drm_display_mode *mode, -struct drm_display_mode *adjusted_mode) +static bool mtk_crtc_mode_fixup (struct drm_crtc *crtc, +const struct drm_display_mode *mode, +struct drm_display_mode *adjusted_mode) {/* Nothing to do here, but this callback is mandatory. */ return true; } -static void mtk_drm_crtc_mode_set_nofb (struct drm_crtc *crtc) +static void mtk_crtc_mode_set_nofb (struct drm_crtc *crtc) {struct mtk_crtc_state *state =to_mtk_crtc_state (crtc->state);
@@ -250,7 +249,7 @@ static void mtk_drm_crtc_mode_set_nofb(struct drm_crtc *crtc) state->pending_config = true; } -static int mtk_crtc_ddp_clk_enable (struct mtk_drm_crtc *mtk_crtc) +static int mtk_crtc_ddp_clk_enable (struct mtk_crtc *mtk_crtc) {int ret;int i;
@@ -270,7 +269,7 @@ static int mtk_crtc_ddp_clk_enable(struct mtk_drm_crtc *mtk_crtc)return ret; } -static void mtk_crtc_ddp_clk_disable (struct mtk_drm_crtc *mtk_crtc) +static void mtk_crtc_ddp_clk_disable (struct mtk_crtc *mtk_crtc) {int i;
@@ -283,7 +282,7 @@ struct mtk_ddp_comp *mtk_drm_ddp_comp_for_plane(struct drm_crtc *crtc,struct drm_plane *plane, unsigned int *local_layer) { - struct mtk_drm_crtc *mtk_crtc = to_mtk_crtc(crtc); + struct mtk_crtc *mtk_crtc = to_mtk_crtc(crtc);struct mtk_ddp_comp *comp;int i, count =0 ;unsigned int local_index = plane - mtk_crtc->planes;
@@ -306,7 +305,7 @@ static void ddp_cmdq_cb(struct mbox_client *cl, void *mssg) {struct cmdq_cb_data *data = mssg; struct cmdq_client *cmdq_cl = container_of(cl, struct cmdq_client, client); - struct mtk_drm_crtc *mtk_crtc = container_of(cmdq_cl, struct mtk_drm_crtc, cmdq_client); + struct mtk_crtc *mtk_crtc = container_of(cmdq_cl, struct mtk_crtc, cmdq_client);struct mtk_crtc_state *state;unsigned int i;
@@ -346,7 +345,7 @@ static void ddp_cmdq_cb(struct mbox_client *cl, void *mssg) }#endif -static int mtk_crtc_ddp_hw_init (struct mtk_drm_crtc *mtk_crtc) +static int mtk_crtc_ddp_hw_init (struct mtk_crtc *mtk_crtc) {struct drm_crtc *crtc = &mtk_crtc->base;struct drm_connector *connector;
@@ -446,7 +445,7 @@ static int mtk_crtc_ddp_hw_init(struct mtk_drm_crtc *mtk_crtc)return ret; } -static void mtk_crtc_ddp_hw_fini (struct mtk_drm_crtc *mtk_crtc) +static void mtk_crtc_ddp_hw_fini (struct mtk_crtc *mtk_crtc) {struct drm_device *drm = mtk_crtc->base.dev;struct drm_crtc *crtc = &mtk_crtc->base;
@@ -491,7 +490,7 @@ static void mtk_crtc_ddp_hw_fini(struct mtk_drm_crtc *mtk_crtc)static void mtk_crtc_ddp_config (struct drm_crtc *crtc,struct cmdq_pkt *cmdq_handle) { -struct mtk_drm_crtc *mtk_crtc =to_mtk_crtc (crtc); +struct mtk_crtc *mtk_crtc =to_mtk_crtc (crtc);struct mtk_crtc_state *state =to_mtk_crtc_state (mtk_crtc->base.state);struct mtk_ddp_comp *comp = mtk_crtc->ddp_comp[0 ];unsigned int i;
@@ -563,8 +562,7 @@ static void mtk_crtc_ddp_config(struct drm_crtc *crtc, } } -static void mtk_drm_crtc_update_config (struct mtk_drm_crtc *mtk_crtc, -bool needs_vblank) +static void mtk_crtc_update_config (struct mtk_crtc *mtk_crtc,bool needs_vblank) {#if IS_REACHABLE (CONFIG_MTK_CMDQ )struct cmdq_pkt *cmdq_handle = &mtk_crtc->cmdq_handle;
@@ -636,7 +634,7 @@ static void mtk_drm_crtc_update_config(struct mtk_drm_crtc *mtk_crtc,static void mtk_crtc_ddp_irq (void *data) {struct drm_crtc *crtc = data; -struct mtk_drm_crtc *mtk_crtc =to_mtk_crtc (crtc); +struct mtk_crtc *mtk_crtc =to_mtk_crtc (crtc);struct mtk_drm_private *priv = crtc->dev->dev_private;#if IS_REACHABLE (CONFIG_MTK_CMDQ )
@@ -652,9 +650,9 @@ static void mtk_crtc_ddp_irq(void *data)mtk_drm_finish_page_flip (mtk_crtc); } -static int mtk_drm_crtc_enable_vblank (struct drm_crtc *crtc) +static int mtk_crtc_enable_vblank (struct drm_crtc *crtc) { -struct mtk_drm_crtc *mtk_crtc =to_mtk_crtc (crtc); +struct mtk_crtc *mtk_crtc =to_mtk_crtc (crtc);struct mtk_ddp_comp *comp = mtk_crtc->ddp_comp[0 ];mtk_ddp_comp_enable_vblank (comp);
@@ -662,22 +660,22 @@ static int mtk_drm_crtc_enable_vblank(struct drm_crtc *crtc)return 0 ; } -static void mtk_drm_crtc_disable_vblank (struct drm_crtc *crtc) +static void mtk_crtc_disable_vblank (struct drm_crtc *crtc) { -struct mtk_drm_crtc *mtk_crtc =to_mtk_crtc (crtc); +struct mtk_crtc *mtk_crtc =to_mtk_crtc (crtc);struct mtk_ddp_comp *comp = mtk_crtc->ddp_comp[0 ];mtk_ddp_comp_disable_vblank (comp); } -static void mtk_drm_crtc_update_output (struct drm_crtc *crtc, -struct drm_atomic_state *state) +static void mtk_crtc_update_output (struct drm_crtc *crtc, +struct drm_atomic_state *state) {int crtc_index =drm_crtc_index (crtc);int i;struct device *dev;struct drm_crtc_state *crtc_state = state->crtcs[crtc_index].new_state; -struct mtk_drm_crtc *mtk_crtc =to_mtk_crtc (crtc); +struct mtk_crtc *mtk_crtc =to_mtk_crtc (crtc);struct mtk_drm_private *priv;unsigned int encoder_mask = crtc_state->encoder_mask;
@@ -707,8 +705,8 @@ static void mtk_drm_crtc_update_output(struct drm_crtc *crtc, } } -int mtk_drm_crtc_plane_check (struct drm_crtc *crtc,struct drm_plane *plane, -struct mtk_plane_state *state) +int mtk_crtc_plane_check (struct drm_crtc *crtc,struct drm_plane *plane, +struct mtk_plane_state *state) {unsigned int local_layer;struct mtk_ddp_comp *comp;
@@ -719,21 +717,21 @@ int mtk_drm_crtc_plane_check(struct drm_crtc *crtc, struct drm_plane *plane,return 0 ; } -void mtk_drm_crtc_async_update (struct drm_crtc *crtc,struct drm_plane *plane, -struct drm_atomic_state *state) +void mtk_crtc_async_update (struct drm_crtc *crtc,struct drm_plane *plane, +struct drm_atomic_state *state) { -struct mtk_drm_crtc *mtk_crtc =to_mtk_crtc (crtc); +struct mtk_crtc *mtk_crtc =to_mtk_crtc (crtc);if (!mtk_crtc->enabled)return ; -mtk_drm_crtc_update_config (mtk_crtc, false); +mtk_crtc_update_config (mtk_crtc, false); } -static void mtk_drm_crtc_atomic_enable (struct drm_crtc *crtc, -struct drm_atomic_state *state) +static void mtk_crtc_atomic_enable (struct drm_crtc *crtc, +struct drm_atomic_state *state) { -struct mtk_drm_crtc *mtk_crtc =to_mtk_crtc (crtc); +struct mtk_crtc *mtk_crtc =to_mtk_crtc (crtc);struct mtk_ddp_comp *comp = mtk_crtc->ddp_comp[0 ];int ret;
@@ -745,7 +743,7 @@ static void mtk_drm_crtc_atomic_enable(struct drm_crtc *crtc,return ; } -mtk_drm_crtc_update_output (crtc, state); +mtk_crtc_update_output (crtc, state); ret =mtk_crtc_ddp_hw_init (mtk_crtc);if (ret) {
@@ -757,15 +755,12 @@ static void mtk_drm_crtc_atomic_enable(struct drm_crtc *crtc, mtk_crtc->enabled = true; } -static void mtk_drm_crtc_atomic_disable (struct drm_crtc *crtc, -struct drm_atomic_state *state) +static void mtk_crtc_atomic_disable (struct drm_crtc *crtc, +struct drm_atomic_state *state) { -struct mtk_drm_crtc *mtk_crtc =to_mtk_crtc (crtc); +struct mtk_crtc *mtk_crtc =to_mtk_crtc (crtc);struct mtk_ddp_comp *comp = mtk_crtc->ddp_comp[0 ];int i; - -DRM_DEBUG_DRIVER ("%s %d\n" , __func__, crtc->base.id); -if (!mtk_crtc->enabled)return ;/* Set all pending plane state to disabled */
@@ -779,7 +774,7 @@ static void mtk_drm_crtc_atomic_disable(struct drm_crtc *crtc, } mtk_crtc->pending_planes = true; -mtk_drm_crtc_update_config (mtk_crtc, false); +mtk_crtc_update_config (mtk_crtc, false);#if IS_REACHABLE (CONFIG_MTK_CMDQ )/* Wait for planes to be disabled by cmdq */ if (mtk_crtc->cmdq_client.chan)
@@ -797,13 +792,13 @@ static void mtk_drm_crtc_atomic_disable(struct drm_crtc *crtc, mtk_crtc->enabled = false; } -static void mtk_drm_crtc_atomic_begin (struct drm_crtc *crtc, -struct drm_atomic_state *state) +static void mtk_crtc_atomic_begin (struct drm_crtc *crtc, +struct drm_atomic_state *state) {struct drm_crtc_state *crtc_state =drm_atomic_get_new_crtc_state (state, crtc);struct mtk_crtc_state *mtk_crtc_state =to_mtk_crtc_state (crtc_state); -struct mtk_drm_crtc *mtk_crtc =to_mtk_crtc (crtc); +struct mtk_crtc *mtk_crtc =to_mtk_crtc (crtc);unsigned long flags;if (mtk_crtc->event && mtk_crtc_state->base.event)
@@ -821,10 +816,10 @@ static void mtk_drm_crtc_atomic_begin(struct drm_crtc *crtc, } } -static void mtk_drm_crtc_atomic_flush (struct drm_crtc *crtc, -struct drm_atomic_state *state) +static void mtk_crtc_atomic_flush (struct drm_crtc *crtc, +struct drm_atomic_state *state) { -struct mtk_drm_crtc *mtk_crtc =to_mtk_crtc (crtc); +struct mtk_crtc *mtk_crtc =to_mtk_crtc (crtc);int i;if (crtc->state->color_mgmt_changed)
@@ -832,33 +827,32 @@ static void mtk_drm_crtc_atomic_flush(struct drm_crtc *crtc,mtk_ddp_gamma_set (mtk_crtc->ddp_comp[i], crtc->state);mtk_ddp_ctm_set (mtk_crtc->ddp_comp[i], crtc->state); } -mtk_drm_crtc_update_config (mtk_crtc, !!mtk_crtc->event); +mtk_crtc_update_config (mtk_crtc, !!mtk_crtc->event); }static const struct drm_crtc_funcs mtk_crtc_funcs = { .set_config = drm_atomic_helper_set_config, .page_flip = drm_atomic_helper_page_flip, - .destroy = mtk_drm_crtc_destroy, - .reset = mtk_drm_crtc_reset, - .atomic_duplicate_state = mtk_drm_crtc_duplicate_state, - .atomic_destroy_state = mtk_drm_crtc_destroy_state, - .enable_vblank = mtk_drm_crtc_enable_vblank, - .disable_vblank = mtk_drm_crtc_disable_vblank, + .destroy = mtk_crtc_destroy, + .reset = mtk_crtc_reset, + .atomic_duplicate_state = mtk_crtc_duplicate_state, + .atomic_destroy_state = mtk_crtc_destroy_state, + .enable_vblank = mtk_crtc_enable_vblank, + .disable_vblank = mtk_crtc_disable_vblank, };static const struct drm_crtc_helper_funcs mtk_crtc_helper_funcs = { - .mode_fixup = mtk_drm_crtc_mode_fixup, - .mode_set_nofb = mtk_drm_crtc_mode_set_nofb, - .mode_valid = mtk_drm_crtc_mode_valid, - .atomic_begin = mtk_drm_crtc_atomic_begin, - .atomic_flush = mtk_drm_crtc_atomic_flush, - .atomic_enable = mtk_drm_crtc_atomic_enable, - .atomic_disable = mtk_drm_crtc_atomic_disable, + .mode_fixup = mtk_crtc_mode_fixup, + .mode_set_nofb = mtk_crtc_mode_set_nofb, + .mode_valid = mtk_crtc_mode_valid, + .atomic_begin = mtk_crtc_atomic_begin, + .atomic_flush = mtk_crtc_atomic_flush, + .atomic_enable = mtk_crtc_atomic_enable, + .atomic_disable = mtk_crtc_atomic_disable, }; -static int mtk_drm_crtc_init (struct drm_device *drm, -struct mtk_drm_crtc *mtk_crtc, -unsigned int pipe) +static int mtk_crtc_init (struct drm_device *drm,struct mtk_crtc *mtk_crtc, +unsigned int pipe) {struct drm_plane *primary =NULL ;struct drm_plane *cursor =NULL ;
@@ -885,8 +879,7 @@ static int mtk_drm_crtc_init(struct drm_device *drm,return ret; } -static int mtk_drm_crtc_num_comp_planes (struct mtk_drm_crtc *mtk_crtc, -int comp_idx) +static int mtk_crtc_num_comp_planes (struct mtk_crtc *mtk_crtc,int comp_idx) {struct mtk_ddp_comp *comp;
@@ -904,8 +897,8 @@ static int mtk_drm_crtc_num_comp_planes(struct mtk_drm_crtc *mtk_crtc, }static inline -enum drm_plane_type mtk_drm_crtc_plane_type (unsigned int plane_idx, -unsigned int num_planes) +enum drm_plane_type mtk_crtc_plane_type (unsigned int plane_idx, +unsigned int num_planes) {if (plane_idx ==0 )return DRM_PLANE_TYPE_PRIMARY ;
@@ -916,11 +909,11 @@ enum drm_plane_type mtk_drm_crtc_plane_type(unsigned int plane_idx, } -static int mtk_drm_crtc_init_comp_planes (struct drm_device *drm_dev, -struct mtk_drm_crtc *mtk_crtc, -int comp_idx,int pipe) +static int mtk_crtc_init_comp_planes (struct drm_device *drm_dev, +struct mtk_crtc *mtk_crtc, +int comp_idx,int pipe) { -int num_planes =mtk_drm_crtc_num_comp_planes (mtk_crtc, comp_idx); +int num_planes =mtk_crtc_num_comp_planes (mtk_crtc, comp_idx);struct mtk_ddp_comp *comp = mtk_crtc->ddp_comp[comp_idx];int i, ret;
@@ -928,8 +921,7 @@ static int mtk_drm_crtc_init_comp_planes(struct drm_device *drm_dev, ret =mtk_plane_init (drm_dev, &mtk_crtc->planes[mtk_crtc->layer_nr],BIT (pipe), -mtk_drm_crtc_plane_type (mtk_crtc->layer_nr, - num_planes), +mtk_crtc_plane_type (mtk_crtc->layer_nr, num_planes),mtk_ddp_comp_supported_rotations (comp),mtk_ddp_comp_get_formats (comp),mtk_ddp_comp_get_num_formats (comp));
@@ -941,9 +933,9 @@ static int mtk_drm_crtc_init_comp_planes(struct drm_device *drm_dev,return 0 ; } -struct device *mtk_drm_crtc_dma_dev_get (struct drm_crtc *crtc) +struct device *mtk_crtc_dma_dev_get (struct drm_crtc *crtc) { -struct mtk_drm_crtc *mtk_crtc =NULL ; +struct mtk_crtc *mtk_crtc =NULL ;if (!crtc)return NULL ;
@@ -955,14 +947,14 @@ struct device *mtk_drm_crtc_dma_dev_get(struct drm_crtc *crtc)return mtk_crtc->dma_dev; } -int mtk_drm_crtc_create (struct drm_device *drm_dev, -const unsigned int *path,unsigned int path_len, -int priv_data_index,const struct mtk_drm_route *conn_routes, -unsigned int num_conn_routes) +int mtk_crtc_create (struct drm_device *drm_dev,const unsigned int *path, +unsigned int path_len,int priv_data_index, +const struct mtk_drm_route *conn_routes, +unsigned int num_conn_routes) {struct mtk_drm_private *priv = drm_dev->dev_private;struct device *dev = drm_dev->dev; -struct mtk_drm_crtc *mtk_crtc; +struct mtk_crtc *mtk_crtc;unsigned int num_comp_planes =0 ;int ret;int i;
@@ -1047,7 +1039,7 @@ int mtk_drm_crtc_create(struct drm_device *drm_dev, }for (i =0 ; i < mtk_crtc->ddp_comp_nr; i++) - num_comp_planes +=mtk_drm_crtc_num_comp_planes (mtk_crtc, i); + num_comp_planes +=mtk_crtc_num_comp_planes (mtk_crtc, i); mtk_crtc->planes =devm_kcalloc (dev, num_comp_planes,sizeof (struct drm_plane ),GFP_KERNEL );
@@ -1055,8 +1047,7 @@ int mtk_drm_crtc_create(struct drm_device *drm_dev,return -ENOMEM ;for (i =0 ; i < mtk_crtc->ddp_comp_nr; i++) { - ret =mtk_drm_crtc_init_comp_planes (drm_dev, mtk_crtc, i, - crtc_i); + ret =mtk_crtc_init_comp_planes (drm_dev, mtk_crtc, i, crtc_i);if (ret)return ret; }
@@ -1068,7 +1059,7 @@ int mtk_drm_crtc_create(struct drm_device *drm_dev,*/ mtk_crtc->dma_dev =mtk_ddp_comp_dma_dev_get (&priv->ddp_comp[path[0 ]]); - ret =mtk_drm_crtc_init (drm_dev, mtk_crtc, crtc_i); + ret =mtk_crtc_init (drm_dev, mtk_crtc, crtc_i);if (ret <0 )return ret;
@@ -1138,7 +1129,7 @@ int mtk_drm_crtc_create(struct drm_device *drm_dev, mtk_crtc->num_conn_routes = num_conn_routes; mtk_crtc->conn_routes = conn_routes; -/* increase ddp_comp_nr at the end of mtk_drm_crtc_create */ +/* increase ddp_comp_nr at the end of mtk_crtc_create */ mtk_crtc->ddp_comp_nr++; }
drivers/gpu/drm/mediatek/mtk_drm_crtc.h +13 -15
@@ -3,8 +3,8 @@* Copyright (c) 2015 MediaTek Inc. */ -#ifndef MTK_DRM_CRTC_H -#define MTK_DRM_CRTC_H +#ifndef MTK_CRTC_H +#define MTK_CRTC_H #include <drm/drm_crtc.h> #include "mtk_drm_ddp_comp.h"
@@ -14,17 +14,15 @@#define MTK_MAX_BPC 10#define MTK_MIN_BPC 3 -void mtk_drm_crtc_commit (struct drm_crtc *crtc); -int mtk_drm_crtc_create (struct drm_device *drm_dev, -const unsigned int *path, -unsigned int path_len, -int priv_data_index, -const struct mtk_drm_route *conn_routes, -unsigned int num_conn_routes); -int mtk_drm_crtc_plane_check (struct drm_crtc *crtc,struct drm_plane *plane, -struct mtk_plane_state *state); -void mtk_drm_crtc_async_update (struct drm_crtc *crtc,struct drm_plane *plane, -struct drm_atomic_state *plane_state); -struct device *mtk_drm_crtc_dma_dev_get (struct drm_crtc *crtc); +void mtk_crtc_commit (struct drm_crtc *crtc); +int mtk_crtc_create (struct drm_device *drm_dev,const unsigned int *path, +unsigned int path_len,int priv_data_index, +const struct mtk_drm_route *conn_routes, +unsigned int num_conn_routes); +int mtk_crtc_plane_check (struct drm_crtc *crtc,struct drm_plane *plane, +struct mtk_plane_state *state); +void mtk_crtc_async_update (struct drm_crtc *crtc,struct drm_plane *plane, +struct drm_atomic_state *plane_state); +struct device *mtk_crtc_dma_dev_get (struct drm_crtc *crtc); -#endif /* MTK_DRM_CRTC_H */ +#endif /* MTK_CRTC_H */
drivers/gpu/drm/mediatek/mtk_drm_drv.c +9 -9
@@ -494,24 +494,24 @@ static int mtk_drm_kms_init(struct drm_device *drm) priv_n = private->all_drm_private[j];if (i ==CRTC_MAIN && priv_n->data->main_len) { - ret =mtk_drm_crtc_create (drm, priv_n->data->main_path, - priv_n->data->main_len, j, - priv_n->data->conn_routes, - priv_n->data->num_conn_routes); + ret =mtk_crtc_create (drm, priv_n->data->main_path, + priv_n->data->main_len, j, + priv_n->data->conn_routes, + priv_n->data->num_conn_routes);if (ret) goto err_component_unbind;continue ; }else if (i ==CRTC_EXT && priv_n->data->ext_len) { - ret =mtk_drm_crtc_create (drm, priv_n->data->ext_path, - priv_n->data->ext_len, j,NULL ,0 ); + ret =mtk_crtc_create (drm, priv_n->data->ext_path, + priv_n->data->ext_len, j,NULL ,0 );if (ret) goto err_component_unbind;continue ; }else if (i ==CRTC_THIRD && priv_n->data->third_len) { - ret =mtk_drm_crtc_create (drm, priv_n->data->third_path, - priv_n->data->third_len, j,NULL ,0 ); + ret =mtk_crtc_create (drm, priv_n->data->third_path, + priv_n->data->third_len, j,NULL ,0 );if (ret) goto err_component_unbind;
@@ -523,7 +523,7 @@ static int mtk_drm_kms_init(struct drm_device *drm)/* Use OVL device for all DMA memory allocations */ crtc =drm_crtc_from_index (drm,0 );if (crtc) - dma_dev =mtk_drm_crtc_dma_dev_get (crtc); + dma_dev =mtk_crtc_dma_dev_get (crtc);if (!dma_dev) { ret = -ENODEV ;dev_err (drm->dev,"Need at least one OVL device\n" );
drivers/gpu/drm/mediatek/mtk_drm_drv.h +1 -1
@@ -13,7 +13,7 @@#define DDP_COMPONENT_DRM_OVL_ADAPTOR (DDP_COMPONENT_ID_MAX + 1)#define DDP_COMPONENT_DRM_ID_MAX (DDP_COMPONENT_DRM_OVL_ADAPTOR + 1) -enum mtk_drm_crtc_path { +enum mtk_crtc_path {CRTC_MAIN ,CRTC_EXT ,CRTC_THIRD ,
drivers/gpu/drm/mediatek/mtk_drm_plane.c +5 -5
@@ -117,8 +117,8 @@ static int mtk_plane_atomic_async_check(struct drm_plane *plane,if (!plane->state->fb)return -EINVAL ; - ret =mtk_drm_crtc_plane_check (new_plane_state->crtc, plane, -to_mtk_plane_state (new_plane_state)); + ret =mtk_crtc_plane_check (new_plane_state->crtc, plane, +to_mtk_plane_state (new_plane_state));if (ret)return ret;
@@ -232,7 +232,7 @@ static void mtk_plane_atomic_async_update(struct drm_plane *plane,swap (plane->state->fb, new_state->fb);wmb ();/* Make sure the above parameters are set before update */ new_plane_state->pending.async_dirty = true; -mtk_drm_crtc_async_update (new_state->crtc, plane, state); +mtk_crtc_async_update (new_state->crtc, plane, state); }static const struct drm_plane_funcs mtk_plane_funcs = {
@@ -260,8 +260,8 @@ static int mtk_plane_atomic_check(struct drm_plane *plane,if (WARN_ON (!new_plane_state->crtc))return 0 ; - ret =mtk_drm_crtc_plane_check (new_plane_state->crtc, plane, -to_mtk_plane_state (new_plane_state)); + ret =mtk_crtc_plane_check (new_plane_state->crtc, plane, +to_mtk_plane_state (new_plane_state));if (ret)return ret;
drivers/gpu/drm/mediatek/mtk_dsi.c +1 -1
@@ -662,7 +662,7 @@ static void mtk_dsi_poweroff(struct mtk_dsi *dsi)/* * mtk_dsi_stop() and mtk_dsi_start() is asymmetric, since -* mtk_dsi_stop() should be called after mtk_drm_crtc_atomic_disable(), +* mtk_dsi_stop() should be called after mtk_crtc_atomic_disable(), * which needs irq for vblank, and mtk_dsi_stop() will disable irq. * mtk_dsi_start() needs to be called in mtk_output_dsi_enable(), * after dsi is fully set.
--
2.18.0
PATCH v3 2/14 drm/mediatek: Rename "mtk_drm_ddp_comp" to "mtk_ddp_comp"
In reply to Shawn SungFrom: Hsiao Chien Sung <[email protected]>
Rename all "mtk_drm_ddp_comp" to "mtk_ddp_comp":
- To align the naming rule
- To reduce the code size
--- drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 16 +++++++--------- drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h | 6 +++--- 2 files changed, 10 insertions(+), 12 deletions(-)
drivers/gpu/drm/mediatek/mtk_drm_crtc.c +7 -9
@@ -278,9 +278,9 @@ static void mtk_crtc_ddp_clk_disable(struct mtk_crtc *mtk_crtc) }static -struct mtk_ddp_comp *mtk_drm_ddp_comp_for_plane (struct drm_crtc *crtc, -struct drm_plane *plane, -unsigned int *local_layer) +struct mtk_ddp_comp *mtk_ddp_comp_for_plane (struct drm_crtc *crtc, +struct drm_plane *plane, +unsigned int *local_layer) {struct mtk_crtc *mtk_crtc =to_mtk_crtc (crtc);struct mtk_ddp_comp *comp;
@@ -430,7 +430,7 @@ static int mtk_crtc_ddp_hw_init(struct mtk_crtc *mtk_crtc)/* should not enable layer before crtc enabled */ plane_state->pending.enable = false; - comp =mtk_drm_ddp_comp_for_plane (crtc, plane, &local_layer); + comp =mtk_ddp_comp_for_plane (crtc, plane, &local_layer);if (comp)mtk_ddp_comp_layer_config (comp, local_layer, plane_state,NULL );
@@ -521,8 +521,7 @@ static void mtk_crtc_ddp_config(struct drm_crtc *crtc,if (!plane_state->pending.config)continue ; - comp =mtk_drm_ddp_comp_for_plane (crtc, plane, - &local_layer); + comp =mtk_ddp_comp_for_plane (crtc, plane, &local_layer);if (comp) mtk_ddp_comp_layer_config(comp, local_layer,
@@ -546,8 +545,7 @@ static void mtk_crtc_ddp_config(struct drm_crtc *crtc,if (!plane_state->pending.async_config)continue ; - comp =mtk_drm_ddp_comp_for_plane (crtc, plane, - &local_layer); + comp =mtk_ddp_comp_for_plane (crtc, plane, &local_layer);if (comp) mtk_ddp_comp_layer_config(comp, local_layer,
@@ -711,7 +709,7 @@ int mtk_crtc_plane_check(struct drm_crtc *crtc, struct drm_plane *plane,unsigned int local_layer;struct mtk_ddp_comp *comp; - comp =mtk_drm_ddp_comp_for_plane (crtc, plane, &local_layer); + comp =mtk_ddp_comp_for_plane (crtc, plane, &local_layer);if (comp)return mtk_ddp_comp_layer_check (comp, local_layer, state);return 0 ;
drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h +3 -3
@@ -3,8 +3,8 @@* Copyright (c) 2015 MediaTek Inc. */ -#ifndef MTK_DRM_DDP_COMP_H -#define MTK_DRM_DDP_COMP_H +#ifndef MTK_DDP_COMP_H +#define MTK_DDP_COMP_H #include <linux/io.h> #include <linux/pm_runtime.h>
@@ -340,4 +340,4 @@ void mtk_ddp_write_relaxed(struct cmdq_pkt *cmdq_pkt, unsigned int value,void mtk_ddp_write_mask (struct cmdq_pkt *cmdq_pkt,unsigned int value,struct cmdq_client_reg *cmdq_reg,void __iomem *regs,unsigned int offset,unsigned int mask); -#endif /* MTK_DRM_DDP_COMP_H */ +#endif /* MTK_DDP_COMP_H */
Signature · 1 line
2.18.0
PATCH v3 3/14 drm/mediatek: Rename "mtk_drm_plane" to "mtk_plane"
In reply to Shawn SungFrom: Hsiao Chien Sung <[email protected]>
Rename all "mtk_drm_plane" to "mtk_plane":
- To align the naming rule
- To reduce the code size
--- drivers/gpu/drm/mediatek/mtk_drm_plane.c | 6 +++--- drivers/gpu/drm/mediatek/mtk_drm_plane.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-)
drivers/gpu/drm/mediatek/mtk_drm_plane.c +3 -3
@@ -93,8 +93,8 @@ static bool mtk_plane_format_mod_supported(struct drm_plane *plane,return true; } -static void mtk_drm_plane_destroy_state (struct drm_plane *plane, -struct drm_plane_state *state) +static void mtk_plane_destroy_state (struct drm_plane *plane, +struct drm_plane_state *state) {__drm_atomic_helper_plane_destroy_state (state);kfree (to_mtk_plane_state (state));
@@ -241,7 +241,7 @@ static const struct drm_plane_funcs mtk_plane_funcs = { .destroy = drm_plane_cleanup, .reset = mtk_plane_reset, .atomic_duplicate_state = mtk_plane_duplicate_state, - .atomic_destroy_state = mtk_drm_plane_destroy_state, + .atomic_destroy_state = mtk_plane_destroy_state, .format_mod_supported = mtk_plane_format_mod_supported, };
drivers/gpu/drm/mediatek/mtk_drm_plane.h +2 -2
@@ -4,8 +4,8 @@* Author: CK Hu <[email protected]> */ -#ifndef _MTK_DRM_PLANE_H_ -#define _MTK_DRM_PLANE_H_ +#ifndef _MTK_PLANE_H_ +#define _MTK_PLANE_H_#include <drm/drm_crtc.h> #include <linux/types.h>
--
2.18.0
PATCH v3 4/14 drm/mediatek: Rename "mtk_drm_gem" to "mtk_gem"
In reply to Shawn SungFrom: Hsiao Chien Sung <[email protected]>
Rename all "mtk_drm_gem" to "mtk_gem":
- To align the naming rule
- To reduce the code size
--- drivers/gpu/drm/mediatek/mtk_drm_drv.c | 8 +-- drivers/gpu/drm/mediatek/mtk_drm_gem.c | 63 ++++++++++++------------ drivers/gpu/drm/mediatek/mtk_drm_gem.h | 23 +++++---- drivers/gpu/drm/mediatek/mtk_drm_plane.c | 2 +- 4 files changed, 47 insertions(+), 49 deletions(-)
drivers/gpu/drm/mediatek/mtk_drm_drv.c +4 -4
@@ -576,8 +576,8 @@ DEFINE_DRM_GEM_FOPS(mtk_drm_fops);* We need to override this because the device used to import the memory is * not dev->dev, as drm_gem_prime_import() expects. */ -static struct drm_gem_object *mtk_drm_gem_prime_import (struct drm_device *dev, -struct dma_buf *dma_buf) +static struct drm_gem_object *mtk_gem_prime_import (struct drm_device *dev, +struct dma_buf *dma_buf) {struct mtk_drm_private *private = dev->dev_private;
@@ -587,9 +587,9 @@ static struct drm_gem_object *mtk_drm_gem_prime_import(struct drm_device *dev,static const struct drm_driver mtk_drm_driver = { .driver_features =DRIVER_MODESET |DRIVER_GEM |DRIVER_ATOMIC , - .dumb_create = mtk_drm_gem_dumb_create, + .dumb_create = mtk_gem_dumb_create, - .gem_prime_import = mtk_drm_gem_prime_import, + .gem_prime_import = mtk_gem_prime_import, .gem_prime_import_sg_table = mtk_gem_prime_import_sg_table, .fops = &mtk_drm_fops,
drivers/gpu/drm/mediatek/mtk_drm_gem.c +31 -32
161 lines not on this page · raw message
drivers/gpu/drm/mediatek/mtk_drm_gem.h +11 -12
@@ -3,8 +3,8 @@* Copyright (c) 2015 MediaTek Inc. */ -#ifndef _MTK_DRM_GEM_H_ -#define _MTK_DRM_GEM_H_ +#ifndef _MTK_GEM_H_ +#define _MTK_GEM_H_#include <drm/drm_gem.h>
@@ -22,7 +22,7 @@* P.S. this object would be transferred to user as kms_bo.handle so * user can access the buffer through kms_bo.handle. */ -struct mtk_drm_gem_obj { +struct mtk_gem_obj {struct drm_gem_object base;void *cookie;void *kvaddr;
@@ -32,18 +32,17 @@ struct mtk_drm_gem_obj { struct page **pages; }; -#define to_mtk_gem_obj (x) container_of(x, struct mtk_drm_gem_obj, base) +#define to_mtk_gem_obj (x) container_of(x, struct mtk_gem_obj, base) -void mtk_drm_gem_free_object (struct drm_gem_object *gem); -struct mtk_drm_gem_obj *mtk_drm_gem_create (struct drm_device *dev,size_t size, -bool alloc_kmap); -int mtk_drm_gem_dumb_create (struct drm_file *file_priv,struct drm_device *dev, -struct drm_mode_create_dumb *args); +void mtk_gem_free_object (struct drm_gem_object *gem); +struct mtk_gem_obj *mtk_gem_create (struct drm_device *dev,size_t size, +bool alloc_kmap); +int mtk_gem_dumb_create (struct drm_file *file_priv,struct drm_device *dev, +struct drm_mode_create_dumb *args);struct sg_table *mtk_gem_prime_get_sg_table (struct drm_gem_object *obj);struct drm_gem_object *mtk_gem_prime_import_sg_table (struct drm_device *dev,struct dma_buf_attachment *attach,struct sg_table *sg); -int mtk_drm_gem_prime_vmap (struct drm_gem_object *obj,struct iosys_map *map); -void mtk_drm_gem_prime_vunmap (struct drm_gem_object *obj, -struct iosys_map *map); +int mtk_gem_prime_vmap (struct drm_gem_object *obj,struct iosys_map *map); +void mtk_gem_prime_vunmap (struct drm_gem_object *obj,struct iosys_map *map);#endif
drivers/gpu/drm/mediatek/mtk_drm_plane.c +1 -1
@@ -135,7 +135,7 @@ static void mtk_plane_update_new_state(struct drm_plane_state *new_state, {struct drm_framebuffer *fb = new_state->fb;struct drm_gem_object *gem; -struct mtk_drm_gem_obj *mtk_gem; +struct mtk_gem_obj *mtk_gem;unsigned int pitch, format;u64 modifier;dma_addr_t addr;
--
2.18.0
PATCH v3 5/14 drm/mediatek: Rename "mtk_drm_hdmi" to "mtk_hdmi"
In reply to Shawn SungFrom: Hsiao Chien Sung <[email protected]>
Rename all "mtk_drm_hdmi" to "mtk_hdmi":
- To align the naming rule
- To reduce the code size
--- drivers/gpu/drm/mediatek/mtk_hdmi.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/gpu/drm/mediatek/mtk_hdmi.c +7 -7
@@ -1687,7 +1687,7 @@ static int mtk_hdmi_register_audio_driver(struct device *dev)return 0 ; } -static int mtk_drm_hdmi_probe (struct platform_device *pdev) +static int mtk_hdmi_probe (struct platform_device *pdev) {struct mtk_hdmi *hdmi;struct device *dev = &pdev->dev;
@@ -1746,7 +1746,7 @@ static int mtk_drm_hdmi_probe(struct platform_device *pdev)return ret; } -static void mtk_drm_hdmi_remove (struct platform_device *pdev) +static void mtk_hdmi_remove (struct platform_device *pdev) {struct mtk_hdmi *hdmi =platform_get_drvdata (pdev);
@@ -1790,7 +1790,7 @@ static const struct mtk_hdmi_conf mtk_hdmi_conf_mt8167 = { .cea_modes_only = true, }; -static const struct of_device_id mtk_drm_hdmi_of_ids[] = { +static const struct of_device_id mtk_hdmi_of_ids[] = { { .compatible ="mediatek,mt2701-hdmi" , .data = &mtk_hdmi_conf_mt2701, },
@@ -1801,14 +1801,14 @@ static const struct of_device_id mtk_drm_hdmi_of_ids[] = { }, {} }; -MODULE_DEVICE_TABLE (of, mtk_drm_hdmi_of_ids); +MODULE_DEVICE_TABLE (of, mtk_hdmi_of_ids);static struct platform_driver mtk_hdmi_driver = { - .probe = mtk_drm_hdmi_probe, - .remove_new = mtk_drm_hdmi_remove, + .probe = mtk_hdmi_probe, + .remove_new = mtk_hdmi_remove, .driver = { .name ="mediatek-drm-hdmi" , - .of_match_table = mtk_drm_hdmi_of_ids, + .of_match_table = mtk_hdmi_of_ids, .pm = &mtk_hdmi_pm_ops, }, };
--
2.18.0
PATCH v3 6/14 drm/mediatek: Rename files "mtk_drm_crtc.h" to "mtk_crtc.h"
In reply to Shawn SungFrom: Hsiao Chien Sung <[email protected]>
Rename files mtk_drm_crtc.h to mtk_crtc.h.
---
drivers/gpu/drm/mediatek/{mtk_drm_crtc.h => mtk_crtc.h} | 0
drivers/gpu/drm/mediatek/mtk_disp_aal.c | 2 +-
drivers/gpu/drm/mediatek/mtk_disp_ccorr.c | 2 +-
drivers/gpu/drm/mediatek/mtk_disp_color.c | 2 +-
drivers/gpu/drm/mediatek/mtk_disp_gamma.c | 2 +-
drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 2 +-
drivers/gpu/drm/mediatek/mtk_disp_ovl_adaptor.c | 2 +-
drivers/gpu/drm/mediatek/mtk_disp_rdma.c | 2 +-
drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 2 +-
drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 2 +-
drivers/gpu/drm/mediatek/mtk_drm_drv.c | 2 +-
drivers/gpu/drm/mediatek/mtk_drm_plane.c | 2 +-
drivers/gpu/drm/mediatek/mtk_ethdr.c | 2 +-
drivers/gpu/drm/mediatek/mtk_padding.c | 2 +-
14 files changed, 13 insertions(+), 13 deletions(-)
rename drivers/gpu/drm/mediatek/{mtk_drm_crtc.h => mtk_crtc.h} (100%)drivers/gpu/drm/mediatek/mtk_crtc.h renamed from drivers/gpu/drm/mediatek/mtk_drm_crtc.h +0 -0
drivers/gpu/drm/mediatek/mtk_disp_aal.c +1 -1
@@ -11,8 +11,8 @@#include <linux/platform_device.h> #include <linux/soc/mediatek/mtk-cmdq.h> +#include "mtk_crtc.h" #include "mtk_disp_drv.h" -#include "mtk_drm_crtc.h" #include "mtk_drm_ddp_comp.h" #include "mtk_drm_drv.h"
drivers/gpu/drm/mediatek/mtk_disp_ccorr.c +1 -1
@@ -10,8 +10,8 @@#include <linux/platform_device.h> #include <linux/soc/mediatek/mtk-cmdq.h> +#include "mtk_crtc.h" #include "mtk_disp_drv.h" -#include "mtk_drm_crtc.h" #include "mtk_drm_ddp_comp.h" #include "mtk_drm_drv.h"
drivers/gpu/drm/mediatek/mtk_disp_color.c +1 -1
@@ -10,8 +10,8 @@#include <linux/platform_device.h> #include <linux/soc/mediatek/mtk-cmdq.h> +#include "mtk_crtc.h" #include "mtk_disp_drv.h" -#include "mtk_drm_crtc.h" #include "mtk_drm_ddp_comp.h" #include "mtk_drm_drv.h"
drivers/gpu/drm/mediatek/mtk_disp_gamma.c +1 -1
@@ -11,8 +11,8 @@#include <linux/platform_device.h> #include <linux/soc/mediatek/mtk-cmdq.h> +#include "mtk_crtc.h" #include "mtk_disp_drv.h" -#include "mtk_drm_crtc.h" #include "mtk_drm_ddp_comp.h" #include "mtk_drm_drv.h"
drivers/gpu/drm/mediatek/mtk_disp_ovl.c +1 -1
@@ -15,8 +15,8 @@#include <linux/pm_runtime.h> #include <linux/soc/mediatek/mtk-cmdq.h> +#include "mtk_crtc.h" #include "mtk_disp_drv.h" -#include "mtk_drm_crtc.h" #include "mtk_drm_ddp_comp.h" #include "mtk_drm_drv.h"
drivers/gpu/drm/mediatek/mtk_disp_ovl_adaptor.c +1 -1
@@ -17,8 +17,8 @@#include <linux/soc/mediatek/mtk-mmsys.h> #include <linux/soc/mediatek/mtk-mutex.h> +#include "mtk_crtc.h" #include "mtk_disp_drv.h" -#include "mtk_drm_crtc.h" #include "mtk_drm_ddp_comp.h" #include "mtk_drm_drv.h" #include "mtk_ethdr.h"
drivers/gpu/drm/mediatek/mtk_disp_rdma.c +1 -1
@@ -13,8 +13,8 @@#include <linux/pm_runtime.h> #include <linux/soc/mediatek/mtk-cmdq.h> +#include "mtk_crtc.h" #include "mtk_disp_drv.h" -#include "mtk_drm_crtc.h" #include "mtk_drm_ddp_comp.h" #include "mtk_drm_drv.h"
drivers/gpu/drm/mediatek/mtk_drm_crtc.c +1 -1
@@ -19,8 +19,8 @@#include <drm/drm_probe_helper.h> #include <drm/drm_vblank.h> +#include "mtk_crtc.h" #include "mtk_drm_drv.h" -#include "mtk_drm_crtc.h" #include "mtk_drm_ddp_comp.h" #include "mtk_drm_gem.h" #include "mtk_drm_plane.h"
drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c +1 -1
@@ -14,11 +14,11 @@#include <linux/soc/mediatek/mtk-cmdq.h> #include <drm/drm_print.h> +#include "mtk_crtc.h" #include "mtk_disp_drv.h" #include "mtk_drm_drv.h" #include "mtk_drm_plane.h" #include "mtk_drm_ddp_comp.h" -#include "mtk_drm_crtc.h" #define DISP_REG_DITHER_EN 0x0000
drivers/gpu/drm/mediatek/mtk_drm_drv.c +1 -1
@@ -24,7 +24,7 @@#include <drm/drm_probe_helper.h> #include <drm/drm_vblank.h> -#include "mtk_drm_crtc.h" +#include "mtk_crtc.h" #include "mtk_drm_ddp_comp.h" #include "mtk_drm_drv.h" #include "mtk_drm_gem.h"
drivers/gpu/drm/mediatek/mtk_drm_plane.c +1 -1
@@ -13,7 +13,7 @@#include <drm/drm_gem_atomic_helper.h> #include <linux/align.h> -#include "mtk_drm_crtc.h" +#include "mtk_crtc.h" #include "mtk_drm_ddp_comp.h" #include "mtk_drm_drv.h" #include "mtk_drm_gem.h"
drivers/gpu/drm/mediatek/mtk_ethdr.c +1 -1
@@ -14,7 +14,7 @@#include <linux/soc/mediatek/mtk-cmdq.h> #include <linux/soc/mediatek/mtk-mmsys.h> -#include "mtk_drm_crtc.h" +#include "mtk_crtc.h" #include "mtk_drm_ddp_comp.h" #include "mtk_drm_drv.h" #include "mtk_ethdr.h"
drivers/gpu/drm/mediatek/mtk_padding.c +1 -1
@@ -11,8 +11,8 @@#include <linux/pm_runtime.h> #include <linux/soc/mediatek/mtk-cmdq.h> +#include "mtk_crtc.h" #include "mtk_disp_drv.h" -#include "mtk_drm_crtc.h" #include "mtk_drm_ddp_comp.h" #define PADDING_CONTROL_REG 0x00
--
2.18.0
PATCH v3 7/14 drm/mediatek: Rename files "mtk_drm_crtc.c" to "mtk_crtc.c"
In reply to Shawn SungFrom: Hsiao Chien Sung <[email protected]>
Rename files mtk_drm_crtc.c to mtk_crtc.c and
modify the Makefile accordingly.
---
drivers/gpu/drm/mediatek/Makefile | 4 ++--
drivers/gpu/drm/mediatek/{mtk_drm_crtc.c => mtk_crtc.c} | 0
2 files changed, 2 insertions(+), 2 deletions(-)
rename drivers/gpu/drm/mediatek/{mtk_drm_crtc.c => mtk_crtc.c} (100%)drivers/gpu/drm/mediatek/Makefile +2 -2
@@ -1,6 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 -mediatek-drm-y := mtk_disp_aal.o \ +mediatek-drm-y := mtk_crtc.o \ + mtk_disp_aal.o \ mtk_disp_ccorr.o \ mtk_disp_color.o \ mtk_disp_gamma.o \
@@ -8,7 +9,6 @@ mediatek-drm-y := mtk_disp_aal.o \ mtk_disp_ovl.o \ mtk_disp_ovl_adaptor.o \ mtk_disp_rdma.o \ - mtk_drm_crtc.o \ mtk_drm_ddp_comp.o \ mtk_drm_drv.o \ mtk_drm_gem.o \
drivers/gpu/drm/mediatek/mtk_crtc.c renamed from drivers/gpu/drm/mediatek/mtk_drm_crtc.c +0 -0
Signature · 1 line
2.18.0
Re: [PATCH v3 07/14] drm/mediatek: Rename files "mtk_drm_crtc.c" to "mtk_crtc.c"
Il 20/03/24 03:42, Shawn Sung ha scritto:
Quoted 7 lines
From: Hsiao Chien Sung <[email protected]>
Rename files
mtk_drm_crtc.ctomtk_crtc.cand
modify theMakefileaccordingly.Reviewed-by CK Hu <[email protected]>Signed-off-by Hsiao Chien Sung <[email protected]>
PATCH v3 8/14 drm/mediatek: Rename files "mtk_drm_ddp_comp.h" to "mtk_ddp_comp.h"
In reply to Shawn SungFrom: Hsiao Chien Sung <[email protected]>
Rename files mtk_drm_ddp_comp.h to mtk_ddp_comp.h.
---
drivers/gpu/drm/mediatek/mtk_crtc.c | 2 +-
drivers/gpu/drm/mediatek/mtk_crtc.h | 2 +-
drivers/gpu/drm/mediatek/{mtk_drm_ddp_comp.h => mtk_ddp_comp.h} | 0
drivers/gpu/drm/mediatek/mtk_disp_aal.c | 2 +-
drivers/gpu/drm/mediatek/mtk_disp_ccorr.c | 2 +-
drivers/gpu/drm/mediatek/mtk_disp_color.c | 2 +-
drivers/gpu/drm/mediatek/mtk_disp_gamma.c | 2 +-
drivers/gpu/drm/mediatek/mtk_disp_merge.c | 2 +-
drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 2 +-
drivers/gpu/drm/mediatek/mtk_disp_ovl_adaptor.c | 2 +-
drivers/gpu/drm/mediatek/mtk_disp_rdma.c | 2 +-
drivers/gpu/drm/mediatek/mtk_dpi.c | 2 +-
drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 2 +-
drivers/gpu/drm/mediatek/mtk_drm_drv.c | 2 +-
drivers/gpu/drm/mediatek/mtk_drm_drv.h | 2 +-
drivers/gpu/drm/mediatek/mtk_drm_plane.c | 2 +-
drivers/gpu/drm/mediatek/mtk_dsi.c | 2 +-
drivers/gpu/drm/mediatek/mtk_ethdr.c | 2 +-
drivers/gpu/drm/mediatek/mtk_padding.c | 2 +-
19 files changed, 18 insertions(+), 18 deletions(-)
rename drivers/gpu/drm/mediatek/{mtk_drm_ddp_comp.h => mtk_ddp_comp.h} (100%)drivers/gpu/drm/mediatek/mtk_crtc.c +1 -1
@@ -20,8 +20,8 @@#include <drm/drm_vblank.h> #include "mtk_crtc.h" +#include "mtk_ddp_comp.h" #include "mtk_drm_drv.h" -#include "mtk_drm_ddp_comp.h" #include "mtk_drm_gem.h" #include "mtk_drm_plane.h"
drivers/gpu/drm/mediatek/mtk_crtc.h +1 -1
@@ -7,7 +7,7 @@#define MTK_CRTC_H #include <drm/drm_crtc.h> -#include "mtk_drm_ddp_comp.h" +#include "mtk_ddp_comp.h" #include "mtk_drm_drv.h" #include "mtk_drm_plane.h"
drivers/gpu/drm/mediatek/mtk_ddp_comp.h renamed from drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h +0 -0
drivers/gpu/drm/mediatek/mtk_disp_aal.c +1 -1
@@ -12,8 +12,8 @@#include <linux/soc/mediatek/mtk-cmdq.h> #include "mtk_crtc.h" +#include "mtk_ddp_comp.h" #include "mtk_disp_drv.h" -#include "mtk_drm_ddp_comp.h" #include "mtk_drm_drv.h" #define DISP_AAL_EN 0x0000
drivers/gpu/drm/mediatek/mtk_disp_ccorr.c +1 -1
@@ -11,8 +11,8 @@#include <linux/soc/mediatek/mtk-cmdq.h> #include "mtk_crtc.h" +#include "mtk_ddp_comp.h" #include "mtk_disp_drv.h" -#include "mtk_drm_ddp_comp.h" #include "mtk_drm_drv.h" #define DISP_CCORR_EN 0x0000
drivers/gpu/drm/mediatek/mtk_disp_color.c +1 -1
@@ -11,8 +11,8 @@#include <linux/soc/mediatek/mtk-cmdq.h> #include "mtk_crtc.h" +#include "mtk_ddp_comp.h" #include "mtk_disp_drv.h" -#include "mtk_drm_ddp_comp.h" #include "mtk_drm_drv.h" #define DISP_COLOR_CFG_MAIN 0x0400
drivers/gpu/drm/mediatek/mtk_disp_gamma.c +1 -1
@@ -12,8 +12,8 @@#include <linux/soc/mediatek/mtk-cmdq.h> #include "mtk_crtc.h" +#include "mtk_ddp_comp.h" #include "mtk_disp_drv.h" -#include "mtk_drm_ddp_comp.h" #include "mtk_drm_drv.h" #define DISP_GAMMA_EN 0x0000
drivers/gpu/drm/mediatek/mtk_disp_merge.c +1 -1
@@ -10,7 +10,7 @@#include <linux/reset.h> #include <linux/soc/mediatek/mtk-cmdq.h> -#include "mtk_drm_ddp_comp.h" +#include "mtk_ddp_comp.h" #include "mtk_drm_drv.h" #include "mtk_disp_drv.h"
drivers/gpu/drm/mediatek/mtk_disp_ovl.c +1 -1
@@ -16,8 +16,8 @@#include <linux/soc/mediatek/mtk-cmdq.h> #include "mtk_crtc.h" +#include "mtk_ddp_comp.h" #include "mtk_disp_drv.h" -#include "mtk_drm_ddp_comp.h" #include "mtk_drm_drv.h" #define DISP_REG_OVL_INTEN 0x0004
drivers/gpu/drm/mediatek/mtk_disp_ovl_adaptor.c +1 -1
@@ -18,8 +18,8 @@#include <linux/soc/mediatek/mtk-mutex.h> #include "mtk_crtc.h" +#include "mtk_ddp_comp.h" #include "mtk_disp_drv.h" -#include "mtk_drm_ddp_comp.h" #include "mtk_drm_drv.h" #include "mtk_ethdr.h"
drivers/gpu/drm/mediatek/mtk_disp_rdma.c +1 -1
@@ -14,8 +14,8 @@#include <linux/soc/mediatek/mtk-cmdq.h> #include "mtk_crtc.h" +#include "mtk_ddp_comp.h" #include "mtk_disp_drv.h" -#include "mtk_drm_ddp_comp.h" #include "mtk_drm_drv.h" #define DISP_REG_RDMA_INT_ENABLE 0x0000
drivers/gpu/drm/mediatek/mtk_dpi.c +1 -1
@@ -26,9 +26,9 @@#include <drm/drm_of.h> #include <drm/drm_simple_kms_helper.h> +#include "mtk_ddp_comp.h" #include "mtk_disp_drv.h" #include "mtk_dpi_regs.h" -#include "mtk_drm_ddp_comp.h" #include "mtk_drm_drv.h" enum mtk_dpi_out_bit_num {
drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c +1 -1
@@ -15,10 +15,10 @@#include <drm/drm_print.h> #include "mtk_crtc.h" +#include "mtk_ddp_comp.h" #include "mtk_disp_drv.h" #include "mtk_drm_drv.h" #include "mtk_drm_plane.h" -#include "mtk_drm_ddp_comp.h" #define DISP_REG_DITHER_EN 0x0000
drivers/gpu/drm/mediatek/mtk_drm_drv.c +1 -1
@@ -25,7 +25,7 @@#include <drm/drm_vblank.h> #include "mtk_crtc.h" -#include "mtk_drm_ddp_comp.h" +#include "mtk_ddp_comp.h" #include "mtk_drm_drv.h" #include "mtk_drm_gem.h"
drivers/gpu/drm/mediatek/mtk_drm_drv.h +1 -1
@@ -7,7 +7,7 @@#define MTK_DRM_DRV_H #include <linux/io.h> -#include "mtk_drm_ddp_comp.h" +#include "mtk_ddp_comp.h" #define MAX_CONNECTOR 2#define DDP_COMPONENT_DRM_OVL_ADAPTOR (DDP_COMPONENT_ID_MAX + 1)
drivers/gpu/drm/mediatek/mtk_drm_plane.c +1 -1
@@ -14,7 +14,7 @@#include <linux/align.h> #include "mtk_crtc.h" -#include "mtk_drm_ddp_comp.h" +#include "mtk_ddp_comp.h" #include "mtk_drm_drv.h" #include "mtk_drm_gem.h" #include "mtk_drm_plane.h"
drivers/gpu/drm/mediatek/mtk_dsi.c +1 -1
@@ -28,8 +28,8 @@#include <drm/drm_probe_helper.h> #include <drm/drm_simple_kms_helper.h> +#include "mtk_ddp_comp.h" #include "mtk_disp_drv.h" -#include "mtk_drm_ddp_comp.h" #include "mtk_drm_drv.h" #define DSI_START 0x00
drivers/gpu/drm/mediatek/mtk_ethdr.c +1 -1
@@ -15,7 +15,7 @@#include <linux/soc/mediatek/mtk-mmsys.h> #include "mtk_crtc.h" -#include "mtk_drm_ddp_comp.h" +#include "mtk_ddp_comp.h" #include "mtk_drm_drv.h" #include "mtk_ethdr.h"
drivers/gpu/drm/mediatek/mtk_padding.c +1 -1
@@ -12,8 +12,8 @@#include <linux/soc/mediatek/mtk-cmdq.h> #include "mtk_crtc.h" +#include "mtk_ddp_comp.h" #include "mtk_disp_drv.h" -#include "mtk_drm_ddp_comp.h" #define PADDING_CONTROL_REG 0x00#define PADDING_BYPASS BIT(0)
--
2.18.0
PATCH v3 9/14 drm/mediatek: Rename files "mtk_drm_ddp_comp.c" to "mtk_ddp_comp.c"
In reply to Shawn SungFrom: Hsiao Chien Sung <[email protected]>
Rename files mtk_drm_ddp_comp.c to mtk_ddp_comp.c and modify the Makefile accordingly.
---
drivers/gpu/drm/mediatek/Makefile | 2 +-
drivers/gpu/drm/mediatek/{mtk_drm_ddp_comp.c => mtk_ddp_comp.c} | 0
2 files changed, 1 insertion(+), 1 deletion(-)
rename drivers/gpu/drm/mediatek/{mtk_drm_ddp_comp.c => mtk_ddp_comp.c} (100%)drivers/gpu/drm/mediatek/Makefile +1 -1
@@ -1,6 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 mediatek-drm-y := mtk_crtc.o \ + mtk_ddp_comp.o \ mtk_disp_aal.o \ mtk_disp_ccorr.o \ mtk_disp_color.o \
@@ -9,7 +10,6 @@ mediatek-drm-y := mtk_crtc.o \ mtk_disp_ovl.o \ mtk_disp_ovl_adaptor.o \ mtk_disp_rdma.o \ - mtk_drm_ddp_comp.o \ mtk_drm_drv.o \ mtk_drm_gem.o \ mtk_drm_plane.o \
drivers/gpu/drm/mediatek/mtk_ddp_comp.c renamed from drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c +0 -0
Signature · 1 line
2.18.0
Re: [PATCH v3 09/14] drm/mediatek: Rename files "mtk_drm_ddp_comp.c" to "mtk_ddp_comp.c"
Il 20/03/24 03:42, Shawn Sung ha scritto:
Quoted 7 lines
From: Hsiao Chien Sung <[email protected]>
Rename files
mtk_drm_ddp_comp.ctomtk_ddp_comp.cand modify theMakefileaccordingly.Reviewed-by CK Hu <[email protected]>Signed-off-by Hsiao Chien Sung <[email protected]>
PATCH v3 10/14 drm/mediatek: Rename files "mtk_drm_plane.h" to "mtk_plane.h"
In reply to Shawn SungFrom: Hsiao Chien Sung <[email protected]>
Rename files mtk_drm_plane.h to mtk_plane.h.
---
drivers/gpu/drm/mediatek/mtk_crtc.c | 2 +-
drivers/gpu/drm/mediatek/mtk_crtc.h | 2 +-
drivers/gpu/drm/mediatek/mtk_ddp_comp.c | 2 +-
drivers/gpu/drm/mediatek/mtk_disp_drv.h | 2 +-
drivers/gpu/drm/mediatek/mtk_drm_plane.c | 2 +-
drivers/gpu/drm/mediatek/{mtk_drm_plane.h => mtk_plane.h} | 0
6 files changed, 5 insertions(+), 5 deletions(-)
rename drivers/gpu/drm/mediatek/{mtk_drm_plane.h => mtk_plane.h} (100%)drivers/gpu/drm/mediatek/mtk_crtc.c +1 -1
@@ -23,7 +23,7 @@#include "mtk_ddp_comp.h" #include "mtk_drm_drv.h" #include "mtk_drm_gem.h" -#include "mtk_drm_plane.h" +#include "mtk_plane.h" /* * struct mtk_crtc - MediaTek specific crtc structure.
drivers/gpu/drm/mediatek/mtk_crtc.h +1 -1
@@ -9,7 +9,7 @@#include <drm/drm_crtc.h> #include "mtk_ddp_comp.h" #include "mtk_drm_drv.h" -#include "mtk_drm_plane.h" +#include "mtk_plane.h" #define MTK_MAX_BPC 10#define MTK_MIN_BPC 3
drivers/gpu/drm/mediatek/mtk_ddp_comp.c +1 -1
@@ -18,7 +18,7 @@#include "mtk_ddp_comp.h" #include "mtk_disp_drv.h" #include "mtk_drm_drv.h" -#include "mtk_drm_plane.h" +#include "mtk_plane.h" #define DISP_REG_DITHER_EN 0x0000
drivers/gpu/drm/mediatek/mtk_disp_drv.h +1 -1
@@ -9,8 +9,8 @@#include <linux/soc/mediatek/mtk-cmdq.h> #include <linux/soc/mediatek/mtk-mmsys.h> #include <linux/soc/mediatek/mtk-mutex.h> -#include "mtk_drm_plane.h" #include "mtk_mdp_rdma.h" +#include "mtk_plane.h" int mtk_aal_clk_enable (struct device *dev);void mtk_aal_clk_disable (struct device *dev);
drivers/gpu/drm/mediatek/mtk_drm_plane.c +1 -1
@@ -17,7 +17,7 @@#include "mtk_ddp_comp.h" #include "mtk_drm_drv.h" #include "mtk_drm_gem.h" -#include "mtk_drm_plane.h" +#include "mtk_plane.h" static const u64 modifiers[] = {DRM_FORMAT_MOD_LINEAR ,
drivers/gpu/drm/mediatek/mtk_plane.h renamed from drivers/gpu/drm/mediatek/mtk_drm_plane.h +0 -0
--
2.18.0
PATCH v3 11/14 drm/mediatek: Rename files "mtk_drm_plane.c" to "mtk_plane.c"
In reply to Shawn SungFrom: Hsiao Chien Sung <[email protected]>
Rename files mtk_drm_plane.c to mtk_plane.c and
modify the Makefile accordingly.
---
drivers/gpu/drm/mediatek/Makefile | 4 ++--
drivers/gpu/drm/mediatek/{mtk_drm_plane.c => mtk_plane.c} | 0
2 files changed, 2 insertions(+), 2 deletions(-)
rename drivers/gpu/drm/mediatek/{mtk_drm_plane.c => mtk_plane.c} (100%)drivers/gpu/drm/mediatek/Makefile +2 -2
@@ -12,12 +12,12 @@ mediatek-drm-y := mtk_crtc.o \ mtk_disp_rdma.o \ mtk_drm_drv.o \ mtk_drm_gem.o \ - mtk_drm_plane.o \ mtk_dsi.o \ mtk_dpi.o \ mtk_ethdr.o \ mtk_mdp_rdma.o \ - mtk_padding.o + mtk_padding.o \ + mtk_plane.o obj-$(CONFIG_DRM_MEDIATEK) += mediatek-drm.o
drivers/gpu/drm/mediatek/mtk_plane.c renamed from drivers/gpu/drm/mediatek/mtk_drm_plane.c +0 -0
Signature · 1 line
2.18.0
PATCH v3 12/14 drm/mediatek: Rename files "mtk_drm_gem.h" to "mtk_gem.h"
In reply to Shawn SungFrom: Hsiao Chien Sung <[email protected]>
Rename files mtk_drm_gem.h to mtk_gem.h.
---
drivers/gpu/drm/mediatek/mtk_crtc.c | 2 +-
drivers/gpu/drm/mediatek/mtk_drm_drv.c | 2 +-
drivers/gpu/drm/mediatek/mtk_drm_gem.c | 2 +-
drivers/gpu/drm/mediatek/{mtk_drm_gem.h => mtk_gem.h} | 0
drivers/gpu/drm/mediatek/mtk_plane.c | 2 +-
5 files changed, 4 insertions(+), 4 deletions(-)
rename drivers/gpu/drm/mediatek/{mtk_drm_gem.h => mtk_gem.h} (100%)drivers/gpu/drm/mediatek/mtk_crtc.c +1 -1
@@ -22,7 +22,7 @@#include "mtk_crtc.h" #include "mtk_ddp_comp.h" #include "mtk_drm_drv.h" -#include "mtk_drm_gem.h" +#include "mtk_gem.h" #include "mtk_plane.h" /*
drivers/gpu/drm/mediatek/mtk_drm_drv.c +1 -1
@@ -27,7 +27,7 @@#include "mtk_crtc.h" #include "mtk_ddp_comp.h" #include "mtk_drm_drv.h" -#include "mtk_drm_gem.h" +#include "mtk_gem.h" #define DRIVER_NAME "mediatek"#define DRIVER_DESC "Mediatek SoC DRM"
drivers/gpu/drm/mediatek/mtk_drm_gem.c +1 -1
@@ -12,7 +12,7 @@#include <drm/drm_prime.h> #include "mtk_drm_drv.h" -#include "mtk_drm_gem.h" +#include "mtk_gem.h" static int mtk_gem_object_mmap (struct drm_gem_object *obj,struct vm_area_struct *vma);
drivers/gpu/drm/mediatek/mtk_gem.h renamed from drivers/gpu/drm/mediatek/mtk_drm_gem.h +0 -0
drivers/gpu/drm/mediatek/mtk_plane.c +1 -1
@@ -16,7 +16,7 @@#include "mtk_crtc.h" #include "mtk_ddp_comp.h" #include "mtk_drm_drv.h" -#include "mtk_drm_gem.h" +#include "mtk_gem.h" #include "mtk_plane.h" static const u64 modifiers[] = {
--
2.18.0
PATCH v3 13/14 drm/mediatek: Rename files "mtk_drm_gem.c" to "mtk_gem.c"
In reply to Shawn SungFrom: Hsiao Chien Sung <[email protected]>
Rename files mtk_drm_gem.c to mtk_gem.c.
---
drivers/gpu/drm/mediatek/Makefile | 2 +-
drivers/gpu/drm/mediatek/{mtk_drm_gem.c => mtk_gem.c} | 0
2 files changed, 1 insertion(+), 1 deletion(-)
rename drivers/gpu/drm/mediatek/{mtk_drm_gem.c => mtk_gem.c} (100%)drivers/gpu/drm/mediatek/Makefile +1 -1
@@ -11,10 +11,10 @@ mediatek-drm-y := mtk_crtc.o \ mtk_disp_ovl_adaptor.o \ mtk_disp_rdma.o \ mtk_drm_drv.o \ - mtk_drm_gem.o \ mtk_dsi.o \ mtk_dpi.o \ mtk_ethdr.o \ + mtk_gem.o \ mtk_mdp_rdma.o \ mtk_padding.o \ mtk_plane.o
drivers/gpu/drm/mediatek/mtk_gem.c renamed from drivers/gpu/drm/mediatek/mtk_drm_gem.c +0 -0
--
2.18.0
PATCH v3 14/14 drm/mediatek: Rename mtk_ddp_comp functions
In reply to Shawn SungFrom: Hsiao Chien Sung <[email protected]>
Rename functions of mtk_ddp_comp:
- To align the naming rule
- To reduce the code size
--- drivers/gpu/drm/mediatek/mtk_ddp_comp.c | 45 ++++++++++++++----------- drivers/gpu/drm/mediatek/mtk_ddp_comp.h | 3 +- drivers/gpu/drm/mediatek/mtk_dpi.c | 2 +- drivers/gpu/drm/mediatek/mtk_dsi.c | 2 +- 4 files changed, 28 insertions(+), 24 deletions(-)
drivers/gpu/drm/mediatek/mtk_ddp_comp.c +25 -20
@@ -497,10 +497,10 @@ static const struct mtk_ddp_comp_match mtk_ddp_matches[DDP_COMPONENT_DRM_ID_MAX] [DDP_COMPONENT_WDMA1] = { MTK_DISP_WDMA, 1, NULL }, }; -static bool mtk_drm_find_comp_in_ddp (struct device *dev, -const unsigned int *path, -unsigned int path_len, -struct mtk_ddp_comp *ddp_comp) +static bool mtk_ddp_comp_find (struct device *dev, +const unsigned int *path, +unsigned int path_len, +struct mtk_ddp_comp *ddp_comp) {unsigned int i;
@@ -514,10 +514,10 @@ static bool mtk_drm_find_comp_in_ddp(struct device *dev,return false; } -static unsigned int mtk_drm_find_comp_in_ddp_conn_path (struct device *dev, -const struct mtk_drm_route *routes, -unsigned int num_routes, -struct mtk_ddp_comp *ddp_comp) +static unsigned int mtk_ddp_comp_find_in_route (struct device *dev, +const struct mtk_drm_route *routes, +unsigned int num_routes, +struct mtk_ddp_comp *ddp_comp) {int ret;unsigned int i;
@@ -554,26 +554,31 @@ int mtk_ddp_comp_get_id(struct device_node *node,return -EINVAL ; } -unsigned int mtk_drm_find_possible_crtc_by_comp (struct drm_device *drm, -struct device *dev) +unsigned int mtk_find_possible_crtcs (struct drm_device *drm,struct device *dev) {struct mtk_drm_private *private = drm->dev_private;unsigned int ret =0 ; -if (mtk_drm_find_comp_in_ddp (dev, private->data->main_path, private->data->main_len, - private->ddp_comp)) +if (mtk_ddp_comp_find (dev, + private->data->main_path, + private->data->main_len, + private->ddp_comp)) ret =BIT (0 ); -else if (mtk_drm_find_comp_in_ddp (dev, private->data->ext_path, - private->data->ext_len, private->ddp_comp)) +else if (mtk_ddp_comp_find (dev, + private->data->ext_path, + private->data->ext_len, + private->ddp_comp)) ret =BIT (1 ); -else if (mtk_drm_find_comp_in_ddp (dev, private->data->third_path, - private->data->third_len, private->ddp_comp)) +else if (mtk_ddp_comp_find (dev, + private->data->third_path, + private->data->third_len, + private->ddp_comp)) ret =BIT (2 );else - ret =mtk_drm_find_comp_in_ddp_conn_path (dev, - private->data->conn_routes, - private->data->num_conn_routes, - private->ddp_comp); + ret =mtk_ddp_comp_find_in_route (dev, + private->data->conn_routes, + private->data->num_conn_routes, + private->ddp_comp);return ret; }
drivers/gpu/drm/mediatek/mtk_ddp_comp.h +1 -2
@@ -326,8 +326,7 @@ static inline void mtk_ddp_comp_encoder_index_set(struct mtk_ddp_comp *comp)int mtk_ddp_comp_get_id (struct device_node *node,enum mtk_ddp_comp_type comp_type); -unsigned int mtk_drm_find_possible_crtc_by_comp (struct drm_device *drm, -struct device *dev); +unsigned int mtk_find_possible_crtcs (struct drm_device *drm,struct device *dev);int mtk_ddp_comp_init (struct device_node *comp_node,struct mtk_ddp_comp *comp,unsigned int comp_id);enum mtk_ddp_comp_type mtk_ddp_comp_get_type (unsigned int comp_id);
drivers/gpu/drm/mediatek/mtk_dpi.c +1 -1
@@ -805,7 +805,7 @@ static int mtk_dpi_bind(struct device *dev, struct device *master, void *data)return ret; } - dpi->encoder.possible_crtcs =mtk_drm_find_possible_crtc_by_comp (drm_dev, dpi->dev); + dpi->encoder.possible_crtcs =mtk_find_possible_crtcs (drm_dev, dpi->dev); ret =drm_bridge_attach (&dpi->encoder, &dpi->bridge,NULL ,DRM_BRIDGE_ATTACH_NO_CONNECTOR );
drivers/gpu/drm/mediatek/mtk_dsi.c +1 -1
@@ -836,7 +836,7 @@ static int mtk_dsi_encoder_init(struct drm_device *drm, struct mtk_dsi *dsi)return ret; } - dsi->encoder.possible_crtcs =mtk_drm_find_possible_crtc_by_comp (drm, dsi->host.dev); + dsi->encoder.possible_crtcs =mtk_find_possible_crtcs (drm, dsi->host.dev); ret =drm_bridge_attach (&dsi->encoder, &dsi->bridge,NULL ,DRM_BRIDGE_ATTACH_NO_CONNECTOR );
--
2.18.0