mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-04 04:28:10 -04:00
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: Marijn Suijten <marijn.suijten@somainline.org> Signed-off-by: Dmitry 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
This commit is contained in:
@@ -53,7 +53,7 @@ u32 dpu_core_irq_read(
|
||||
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);
|
||||
|
||||
/**
|
||||
|
||||
@@ -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 irq,
|
||||
void (*func)(void *arg, int irq_idx),
|
||||
void (*func)(void *arg),
|
||||
struct dpu_encoder_wait_info *wait_info)
|
||||
{
|
||||
u32 irq_status;
|
||||
@@ -395,7 +395,7 @@ int dpu_encoder_helper_wait_for_irq(struct dpu_encoder_phys *phys_enc,
|
||||
phys_enc->hw_pp->idx - PINGPONG_0,
|
||||
atomic_read(wait_info->atomic_cnt));
|
||||
local_irq_save(flags);
|
||||
func(phys_enc, irq);
|
||||
func(phys_enc);
|
||||
local_irq_restore(flags);
|
||||
ret = 0;
|
||||
} else {
|
||||
|
||||
@@ -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 irq,
|
||||
void (*func)(void *arg, int irq_idx),
|
||||
void (*func)(void *arg),
|
||||
struct dpu_encoder_wait_info *wait_info);
|
||||
|
||||
/**
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
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;
|
||||
unsigned long lock_flags;
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
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_cmd *cmd_enc;
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
@@ -139,7 +139,7 @@ static void dpu_encoder_phys_cmd_ctl_start_irq(void *arg, int irq_idx)
|
||||
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;
|
||||
|
||||
|
||||
@@ -297,7 +297,7 @@ static void dpu_encoder_phys_vid_setup_timing_engine(
|
||||
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_hw_ctl *hw_ctl;
|
||||
@@ -334,7 +334,7 @@ static void dpu_encoder_phys_vid_vblank_irq(void *arg, int irq_idx)
|
||||
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;
|
||||
|
||||
|
||||
@@ -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_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)
|
||||
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
|
||||
* @phys: Pointer to physical encoder
|
||||
|
||||
@@ -217,7 +217,7 @@ static void dpu_core_irq_callback_handler(struct dpu_kms *dpu_kms, int irq_idx)
|
||||
/*
|
||||
* 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)
|
||||
@@ -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,
|
||||
void (*irq_cb)(void *arg, int irq_idx),
|
||||
void (*irq_cb)(void *arg),
|
||||
void *irq_arg)
|
||||
{
|
||||
unsigned long irq_flags;
|
||||
|
||||
@@ -58,7 +58,7 @@ struct dpu_hw_intr {
|
||||
const struct dpu_intr_reg *intr_set;
|
||||
|
||||
struct {
|
||||
void (*cb)(void *arg, int irq_idx);
|
||||
void (*cb)(void *arg);
|
||||
void *arg;
|
||||
atomic_t count;
|
||||
} irq_tbl[];
|
||||
|
||||
Reference in New Issue
Block a user