Skip to content

Commit

Permalink
riscv:driver:drm:dc
Browse files Browse the repository at this point in the history
fix the build warning

Signed-off-by:keith.zhao<[email protected]>
  • Loading branch information
kJugg committed Feb 10, 2023
1 parent 044e506 commit f9de4d1
Showing 1 changed file with 17 additions and 22 deletions.
39 changes: 17 additions & 22 deletions drivers/gpu/drm/verisilicon/vs_dc.c
Original file line number Diff line number Diff line change
Expand Up @@ -641,25 +641,6 @@ static void dc_deinit(struct device *dev)
dev_err(dev, "assert vout resets error.\n");
}

static irqreturn_t dc_isr(int irq, void *data)
{
struct vs_dc *dc = data;
struct vs_dc_info *dc_info = dc->hw.info;
u32 i, ret;

if(!dc_info)
return IRQ_HANDLED;

ret = dc_hw_get_interrupt(&dc->hw);

for (i = 0; i < dc_info->panel_num; i++)
vs_crtc_handle_vblank(&dc->crtc[i]->base, dc_hw_check_underflow(&dc->hw));

return IRQ_HANDLED;
}


///////////////////////////////////////////////////////////
static int dc_init(struct device *dev)
{
struct vs_dc *dc = dev_get_drvdata(dev);
Expand Down Expand Up @@ -1398,7 +1379,22 @@ static int vs_dc_check_plane(struct device *dev, struct drm_plane *plane,
true, true);
}

static irqreturn_t dc_isr(int irq, void *data)
{
struct vs_dc *dc = data;
struct vs_dc_info *dc_info = dc->hw.info;
u32 i, ret;

if(!dc_info)
return IRQ_HANDLED;

ret = dc_hw_get_interrupt(&dc->hw);

for (i = 0; i < dc_info->panel_num; i++)
vs_crtc_handle_vblank(&dc->crtc[i]->base, dc_hw_check_underflow(&dc->hw));

return IRQ_HANDLED;
}

static void vs_dc_commit(struct device *dev)
{
Expand Down Expand Up @@ -1576,7 +1572,6 @@ static int dc_bind(struct device *dev, struct device *master, void *data)

/*vout clk disable*/
vs_dc_clock_disable(dc);
printk("====> %s, %d--devm_request_irq.\n", __func__, __LINE__);

return 0;

Expand Down Expand Up @@ -1646,8 +1641,8 @@ static int dc_probe(struct platform_device *pdev)
irq = platform_get_irq(pdev, 0);
ret = devm_request_irq(dev, irq, dc_isr, 0, dev_name(dev), dc);
if (ret < 0) {
dev_err(dev, "Failed to install irq:%u.\n", dc->irq);
return;
dev_err(dev, "Failed to install irq:%u.\n", irq);
return ret;
}

dev_set_drvdata(dev, dc);
Expand Down

0 comments on commit f9de4d1

Please sign in to comment.