You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
drm/msm/dpu: introduce the dpu_encoder_phys_* for writeback
Introduce the dpu_encoder_phys_* for the writeback interface to handle writeback specific hardware programming. changes in v4: - squash the encoder_phys_wb bits from [1] - since its a trivial change of a previously acked change preserving the ack [1] https://patchwork.freedesktop.org/patch/483099/?series=102964&rev=2 Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/483532/ Link: https://lore.kernel.org/r/1650984096-9964-14-git-send-email-quic_abhinavk@quicinc.com Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
This commit is contained in:
committed by
Dmitry Baryshkov
parent
21539b8f88
commit
d7d0e73f7d
@@ -60,6 +60,7 @@ msm-$(CONFIG_DRM_MSM_DPU) += \
|
||||
disp/dpu1/dpu_encoder.o \
|
||||
disp/dpu1/dpu_encoder_phys_cmd.o \
|
||||
disp/dpu1/dpu_encoder_phys_vid.o \
|
||||
disp/dpu1/dpu_encoder_phys_wb.o \
|
||||
disp/dpu1/dpu_formats.o \
|
||||
disp/dpu1/dpu_hw_catalog.o \
|
||||
disp/dpu1/dpu_hw_ctl.o \
|
||||
|
||||
@@ -150,6 +150,7 @@ struct dpu_encoder_phys_ops {
|
||||
* @INTR_IDX_PINGPONG: Pingpong done unterrupt for cmd mode panel
|
||||
* @INTR_IDX_UNDERRUN: Underrun unterrupt for video and cmd mode panel
|
||||
* @INTR_IDX_RDPTR: Readpointer done unterrupt for cmd mode panel
|
||||
* @INTR_IDX_WB_DONE: Writeback fone interrupt for virtual connector
|
||||
*/
|
||||
enum dpu_intr_idx {
|
||||
INTR_IDX_VSYNC,
|
||||
@@ -157,6 +158,7 @@ enum dpu_intr_idx {
|
||||
INTR_IDX_UNDERRUN,
|
||||
INTR_IDX_CTL_START,
|
||||
INTR_IDX_RDPTR,
|
||||
INTR_IDX_WB_DONE,
|
||||
INTR_IDX_MAX,
|
||||
};
|
||||
|
||||
@@ -225,6 +227,27 @@ static inline int dpu_encoder_phys_inc_pending(struct dpu_encoder_phys *phys)
|
||||
return atomic_inc_return(&phys->pending_kickoff_cnt);
|
||||
}
|
||||
|
||||
/**
|
||||
* struct dpu_encoder_phys_wb - sub-class of dpu_encoder_phys to handle command
|
||||
* mode specific operations
|
||||
* @base: Baseclass physical encoder structure
|
||||
* @wbirq_refcount: Reference count of writeback interrupt
|
||||
* @wb_done_timeout_cnt: number of wb done irq timeout errors
|
||||
* @wb_cfg: writeback block config to store fb related details
|
||||
* @wb_conn: backpointer to writeback connector
|
||||
* @wb_job: backpointer to current writeback job
|
||||
* @dest: dpu buffer layout for current writeback output buffer
|
||||
*/
|
||||
struct dpu_encoder_phys_wb {
|
||||
struct dpu_encoder_phys base;
|
||||
atomic_t wbirq_refcount;
|
||||
int wb_done_timeout_cnt;
|
||||
struct dpu_hw_wb_cfg wb_cfg;
|
||||
struct drm_writeback_connector *wb_conn;
|
||||
struct drm_writeback_job *wb_job;
|
||||
struct dpu_hw_fmt_layout dest;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct dpu_encoder_phys_cmd - sub-class of dpu_encoder_phys to handle command
|
||||
* mode specific operations
|
||||
@@ -294,6 +317,13 @@ struct dpu_encoder_phys *dpu_encoder_phys_vid_init(
|
||||
struct dpu_encoder_phys *dpu_encoder_phys_cmd_init(
|
||||
struct dpu_enc_phys_init_params *p);
|
||||
|
||||
/**
|
||||
* dpu_encoder_phys_wb_init - initialize writeback encoder
|
||||
* @init: Pointer to init info structure with initialization params
|
||||
*/
|
||||
struct dpu_encoder_phys *dpu_encoder_phys_wb_init(
|
||||
struct dpu_enc_phys_init_params *p);
|
||||
|
||||
/**
|
||||
* dpu_encoder_helper_trigger_start - control start helper function
|
||||
* This helper function may be optionally specified by physical
|
||||
|
||||
751
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c
Normal file
751
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user