Commit 366334a3 authored by Jeykumar Sankaran's avatar Jeykumar Sankaran Committed by Rob Clark

drm/msm/dpu: remove phys_vid subclass

Not holding any video encoder specific data. Get rid of it.
Signed-off-by: default avatarJeykumar Sankaran <jsanka@codeaurora.org>
Signed-off-by: default avatarSean Paul <seanpaul@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/1550107156-17625-3-git-send-email-jsanka@codeaurora.orgSigned-off-by: default avatarRob Clark <robdclark@chromium.org>
parent b6057cda
...@@ -252,17 +252,6 @@ static inline int dpu_encoder_phys_inc_pending(struct dpu_encoder_phys *phys) ...@@ -252,17 +252,6 @@ static inline int dpu_encoder_phys_inc_pending(struct dpu_encoder_phys *phys)
return atomic_inc_return(&phys->pending_kickoff_cnt); return atomic_inc_return(&phys->pending_kickoff_cnt);
} }
/**
* struct dpu_encoder_phys_vid - sub-class of dpu_encoder_phys to handle video
* mode specific operations
* @base: Baseclass physical encoder structure
* @timing_params: Current timing parameter
*/
struct dpu_encoder_phys_vid {
struct dpu_encoder_phys base;
struct intf_timing_params timing_params;
};
/** /**
* struct dpu_encoder_phys_cmd - sub-class of dpu_encoder_phys to handle command * struct dpu_encoder_phys_cmd - sub-class of dpu_encoder_phys to handle command
* mode specific operations * mode specific operations
......
...@@ -240,7 +240,6 @@ static bool dpu_encoder_phys_vid_mode_fixup( ...@@ -240,7 +240,6 @@ static bool dpu_encoder_phys_vid_mode_fixup(
static void dpu_encoder_phys_vid_setup_timing_engine( static void dpu_encoder_phys_vid_setup_timing_engine(
struct dpu_encoder_phys *phys_enc) struct dpu_encoder_phys *phys_enc)
{ {
struct dpu_encoder_phys_vid *vid_enc;
struct drm_display_mode mode; struct drm_display_mode mode;
struct intf_timing_params timing_params = { 0 }; struct intf_timing_params timing_params = { 0 };
const struct dpu_format *fmt = NULL; const struct dpu_format *fmt = NULL;
...@@ -254,7 +253,6 @@ static void dpu_encoder_phys_vid_setup_timing_engine( ...@@ -254,7 +253,6 @@ static void dpu_encoder_phys_vid_setup_timing_engine(
} }
mode = phys_enc->cached_mode; mode = phys_enc->cached_mode;
vid_enc = to_dpu_encoder_phys_vid(phys_enc);
if (!phys_enc->hw_intf->ops.setup_timing_gen) { if (!phys_enc->hw_intf->ops.setup_timing_gen) {
DPU_ERROR("timing engine setup is not supported\n"); DPU_ERROR("timing engine setup is not supported\n");
return; return;
...@@ -293,8 +291,6 @@ static void dpu_encoder_phys_vid_setup_timing_engine( ...@@ -293,8 +291,6 @@ static void dpu_encoder_phys_vid_setup_timing_engine(
spin_unlock_irqrestore(phys_enc->enc_spinlock, lock_flags); spin_unlock_irqrestore(phys_enc->enc_spinlock, lock_flags);
programmable_fetch_config(phys_enc, &timing_params); programmable_fetch_config(phys_enc, &timing_params);
vid_enc->timing_params = timing_params;
} }
static void dpu_encoder_phys_vid_vblank_irq(void *arg, int irq_idx) static void dpu_encoder_phys_vid_vblank_irq(void *arg, int irq_idx)
...@@ -515,16 +511,13 @@ static void dpu_encoder_phys_vid_enable(struct dpu_encoder_phys *phys_enc) ...@@ -515,16 +511,13 @@ static void dpu_encoder_phys_vid_enable(struct dpu_encoder_phys *phys_enc)
static void dpu_encoder_phys_vid_destroy(struct dpu_encoder_phys *phys_enc) static void dpu_encoder_phys_vid_destroy(struct dpu_encoder_phys *phys_enc)
{ {
struct dpu_encoder_phys_vid *vid_enc;
if (!phys_enc) { if (!phys_enc) {
DPU_ERROR("invalid encoder\n"); DPU_ERROR("invalid encoder\n");
return; return;
} }
vid_enc = to_dpu_encoder_phys_vid(phys_enc);
DPU_DEBUG_VIDENC(phys_enc, "\n"); DPU_DEBUG_VIDENC(phys_enc, "\n");
kfree(vid_enc); kfree(phys_enc);
} }
static void dpu_encoder_phys_vid_get_hw_resources( static void dpu_encoder_phys_vid_get_hw_resources(
...@@ -746,7 +739,6 @@ struct dpu_encoder_phys *dpu_encoder_phys_vid_init( ...@@ -746,7 +739,6 @@ struct dpu_encoder_phys *dpu_encoder_phys_vid_init(
struct dpu_enc_phys_init_params *p) struct dpu_enc_phys_init_params *p)
{ {
struct dpu_encoder_phys *phys_enc = NULL; struct dpu_encoder_phys *phys_enc = NULL;
struct dpu_encoder_phys_vid *vid_enc = NULL;
struct dpu_encoder_irq *irq; struct dpu_encoder_irq *irq;
int i, ret = 0; int i, ret = 0;
...@@ -755,14 +747,12 @@ struct dpu_encoder_phys *dpu_encoder_phys_vid_init( ...@@ -755,14 +747,12 @@ struct dpu_encoder_phys *dpu_encoder_phys_vid_init(
goto fail; goto fail;
} }
vid_enc = kzalloc(sizeof(*vid_enc), GFP_KERNEL); phys_enc = kzalloc(sizeof(*phys_enc), GFP_KERNEL);
if (!vid_enc) { if (!phys_enc) {
ret = -ENOMEM; ret = -ENOMEM;
goto fail; goto fail;
} }
phys_enc = &vid_enc->base;
phys_enc->hw_mdptop = p->dpu_kms->hw_mdp; phys_enc->hw_mdptop = p->dpu_kms->hw_mdp;
phys_enc->intf_idx = p->intf_idx; phys_enc->intf_idx = p->intf_idx;
...@@ -806,7 +796,7 @@ struct dpu_encoder_phys *dpu_encoder_phys_vid_init( ...@@ -806,7 +796,7 @@ struct dpu_encoder_phys *dpu_encoder_phys_vid_init(
fail: fail:
DPU_ERROR("failed to create encoder\n"); DPU_ERROR("failed to create encoder\n");
if (vid_enc) if (phys_enc)
dpu_encoder_phys_vid_destroy(phys_enc); dpu_encoder_phys_vid_destroy(phys_enc);
return ERR_PTR(ret); return ERR_PTR(ret);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment