Commit e75e45c2 authored by Dmitry Baryshkov's avatar Dmitry Baryshkov

drm/msm/dpu: remove irq_idx argument from IRQ callbacks

There is no point in passing the IRQ index to IRQ callbacks, no function
uses that. Drop it at last.
Reviewed-by: default avatarMarijn Suijten <marijn.suijten@somainline.org>
Signed-off-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/550925/
Link: https://lore.kernel.org/r/20230802100426.4184892-3-dmitry.baryshkov@linaro.org
parent 10f20628
...@@ -53,7 +53,7 @@ u32 dpu_core_irq_read( ...@@ -53,7 +53,7 @@ u32 dpu_core_irq_read(
int dpu_core_irq_register_callback( int dpu_core_irq_register_callback(
struct dpu_kms *dpu_kms, struct dpu_kms *dpu_kms,
int irq_idx, int irq_idx,
void (*irq_cb)(void *arg, int irq_idx), void (*irq_cb)(void *arg),
void *irq_arg); void *irq_arg);
/** /**
......
...@@ -348,7 +348,7 @@ static int dpu_encoder_helper_wait_event_timeout(int32_t drm_id, ...@@ -348,7 +348,7 @@ static int dpu_encoder_helper_wait_event_timeout(int32_t drm_id,
int dpu_encoder_helper_wait_for_irq(struct dpu_encoder_phys *phys_enc, int dpu_encoder_helper_wait_for_irq(struct dpu_encoder_phys *phys_enc,
int irq, int irq,
void (*func)(void *arg, int irq_idx), void (*func)(void *arg),
struct dpu_encoder_wait_info *wait_info) struct dpu_encoder_wait_info *wait_info)
{ {
u32 irq_status; u32 irq_status;
...@@ -395,7 +395,7 @@ int dpu_encoder_helper_wait_for_irq(struct dpu_encoder_phys *phys_enc, ...@@ -395,7 +395,7 @@ int dpu_encoder_helper_wait_for_irq(struct dpu_encoder_phys *phys_enc,
phys_enc->hw_pp->idx - PINGPONG_0, phys_enc->hw_pp->idx - PINGPONG_0,
atomic_read(wait_info->atomic_cnt)); atomic_read(wait_info->atomic_cnt));
local_irq_save(flags); local_irq_save(flags);
func(phys_enc, irq); func(phys_enc);
local_irq_restore(flags); local_irq_restore(flags);
ret = 0; ret = 0;
} else { } else {
......
...@@ -365,7 +365,7 @@ void dpu_encoder_helper_report_irq_timeout(struct dpu_encoder_phys *phys_enc, ...@@ -365,7 +365,7 @@ void dpu_encoder_helper_report_irq_timeout(struct dpu_encoder_phys *phys_enc,
*/ */
int dpu_encoder_helper_wait_for_irq(struct dpu_encoder_phys *phys_enc, int dpu_encoder_helper_wait_for_irq(struct dpu_encoder_phys *phys_enc,
int irq, int irq,
void (*func)(void *arg, int irq_idx), void (*func)(void *arg),
struct dpu_encoder_wait_info *wait_info); struct dpu_encoder_wait_info *wait_info);
/** /**
......
...@@ -76,7 +76,7 @@ static void _dpu_encoder_phys_cmd_update_intf_cfg( ...@@ -76,7 +76,7 @@ static void _dpu_encoder_phys_cmd_update_intf_cfg(
phys_enc->hw_intf->ops.program_intf_cmd_cfg(phys_enc->hw_intf, &cmd_mode_cfg); phys_enc->hw_intf->ops.program_intf_cmd_cfg(phys_enc->hw_intf, &cmd_mode_cfg);
} }
static void dpu_encoder_phys_cmd_pp_tx_done_irq(void *arg, int irq_idx) static void dpu_encoder_phys_cmd_pp_tx_done_irq(void *arg)
{ {
struct dpu_encoder_phys *phys_enc = arg; struct dpu_encoder_phys *phys_enc = arg;
unsigned long lock_flags; unsigned long lock_flags;
...@@ -103,7 +103,7 @@ static void dpu_encoder_phys_cmd_pp_tx_done_irq(void *arg, int irq_idx) ...@@ -103,7 +103,7 @@ static void dpu_encoder_phys_cmd_pp_tx_done_irq(void *arg, int irq_idx)
DPU_ATRACE_END("pp_done_irq"); DPU_ATRACE_END("pp_done_irq");
} }
static void dpu_encoder_phys_cmd_te_rd_ptr_irq(void *arg, int irq_idx) static void dpu_encoder_phys_cmd_te_rd_ptr_irq(void *arg)
{ {
struct dpu_encoder_phys *phys_enc = arg; struct dpu_encoder_phys *phys_enc = arg;
struct dpu_encoder_phys_cmd *cmd_enc; struct dpu_encoder_phys_cmd *cmd_enc;
...@@ -126,7 +126,7 @@ static void dpu_encoder_phys_cmd_te_rd_ptr_irq(void *arg, int irq_idx) ...@@ -126,7 +126,7 @@ static void dpu_encoder_phys_cmd_te_rd_ptr_irq(void *arg, int irq_idx)
DPU_ATRACE_END("rd_ptr_irq"); DPU_ATRACE_END("rd_ptr_irq");
} }
static void dpu_encoder_phys_cmd_ctl_start_irq(void *arg, int irq_idx) static void dpu_encoder_phys_cmd_ctl_start_irq(void *arg)
{ {
struct dpu_encoder_phys *phys_enc = arg; struct dpu_encoder_phys *phys_enc = arg;
...@@ -139,7 +139,7 @@ static void dpu_encoder_phys_cmd_ctl_start_irq(void *arg, int irq_idx) ...@@ -139,7 +139,7 @@ static void dpu_encoder_phys_cmd_ctl_start_irq(void *arg, int irq_idx)
DPU_ATRACE_END("ctl_start_irq"); DPU_ATRACE_END("ctl_start_irq");
} }
static void dpu_encoder_phys_cmd_underrun_irq(void *arg, int irq_idx) static void dpu_encoder_phys_cmd_underrun_irq(void *arg)
{ {
struct dpu_encoder_phys *phys_enc = arg; struct dpu_encoder_phys *phys_enc = arg;
......
...@@ -297,7 +297,7 @@ static void dpu_encoder_phys_vid_setup_timing_engine( ...@@ -297,7 +297,7 @@ static void dpu_encoder_phys_vid_setup_timing_engine(
programmable_fetch_config(phys_enc, &timing_params); programmable_fetch_config(phys_enc, &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)
{ {
struct dpu_encoder_phys *phys_enc = arg; struct dpu_encoder_phys *phys_enc = arg;
struct dpu_hw_ctl *hw_ctl; struct dpu_hw_ctl *hw_ctl;
...@@ -334,7 +334,7 @@ static void dpu_encoder_phys_vid_vblank_irq(void *arg, int irq_idx) ...@@ -334,7 +334,7 @@ static void dpu_encoder_phys_vid_vblank_irq(void *arg, int irq_idx)
DPU_ATRACE_END("vblank_irq"); DPU_ATRACE_END("vblank_irq");
} }
static void dpu_encoder_phys_vid_underrun_irq(void *arg, int irq_idx) static void dpu_encoder_phys_vid_underrun_irq(void *arg)
{ {
struct dpu_encoder_phys *phys_enc = arg; struct dpu_encoder_phys *phys_enc = arg;
......
...@@ -345,7 +345,11 @@ static void dpu_encoder_phys_wb_setup( ...@@ -345,7 +345,11 @@ static void dpu_encoder_phys_wb_setup(
} }
static void _dpu_encoder_phys_wb_frame_done_helper(void *arg) /**
* dpu_encoder_phys_wb_done_irq - writeback interrupt handler
* @arg: Pointer to writeback encoder
*/
static void dpu_encoder_phys_wb_done_irq(void *arg)
{ {
struct dpu_encoder_phys *phys_enc = arg; struct dpu_encoder_phys *phys_enc = arg;
struct dpu_encoder_phys_wb *wb_enc = to_dpu_encoder_phys_wb(phys_enc); struct dpu_encoder_phys_wb *wb_enc = to_dpu_encoder_phys_wb(phys_enc);
...@@ -371,16 +375,6 @@ static void _dpu_encoder_phys_wb_frame_done_helper(void *arg) ...@@ -371,16 +375,6 @@ static void _dpu_encoder_phys_wb_frame_done_helper(void *arg)
wake_up_all(&phys_enc->pending_kickoff_wq); wake_up_all(&phys_enc->pending_kickoff_wq);
} }
/**
* dpu_encoder_phys_wb_done_irq - writeback interrupt handler
* @arg: Pointer to writeback encoder
* @irq_idx: interrupt index
*/
static void dpu_encoder_phys_wb_done_irq(void *arg, int irq_idx)
{
_dpu_encoder_phys_wb_frame_done_helper(arg);
}
/** /**
* dpu_encoder_phys_wb_irq_ctrl - irq control of WB * dpu_encoder_phys_wb_irq_ctrl - irq control of WB
* @phys: Pointer to physical encoder * @phys: Pointer to physical encoder
......
...@@ -217,7 +217,7 @@ static void dpu_core_irq_callback_handler(struct dpu_kms *dpu_kms, int irq_idx) ...@@ -217,7 +217,7 @@ static void dpu_core_irq_callback_handler(struct dpu_kms *dpu_kms, int irq_idx)
/* /*
* Perform registered function callback * Perform registered function callback
*/ */
dpu_kms->hw_intr->irq_tbl[irq_idx].cb(dpu_kms->hw_intr->irq_tbl[irq_idx].arg, irq_idx); dpu_kms->hw_intr->irq_tbl[irq_idx].cb(dpu_kms->hw_intr->irq_tbl[irq_idx].arg);
} }
irqreturn_t dpu_core_irq(struct msm_kms *kms) irqreturn_t dpu_core_irq(struct msm_kms *kms)
...@@ -507,7 +507,7 @@ void dpu_hw_intr_destroy(struct dpu_hw_intr *intr) ...@@ -507,7 +507,7 @@ void dpu_hw_intr_destroy(struct dpu_hw_intr *intr)
} }
int dpu_core_irq_register_callback(struct dpu_kms *dpu_kms, int irq_idx, int dpu_core_irq_register_callback(struct dpu_kms *dpu_kms, int irq_idx,
void (*irq_cb)(void *arg, int irq_idx), void (*irq_cb)(void *arg),
void *irq_arg) void *irq_arg)
{ {
unsigned long irq_flags; unsigned long irq_flags;
......
...@@ -58,7 +58,7 @@ struct dpu_hw_intr { ...@@ -58,7 +58,7 @@ struct dpu_hw_intr {
const struct dpu_intr_reg *intr_set; const struct dpu_intr_reg *intr_set;
struct { struct {
void (*cb)(void *arg, int irq_idx); void (*cb)(void *arg);
void *arg; void *arg;
atomic_t count; atomic_t count;
} irq_tbl[]; } irq_tbl[];
......
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