mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-23 05:56:14 -04:00
drm/omap: dpi: Simplify clock setting API
The dpi_set_pll_clk() and dpi_set_dispc_clk() return various information through pointer arguments that are never used by the callers. Remove them to simplify the clock setting API. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Tested-by: Sebastian Reichel <sebastian.reichel@collabora.com> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200226112514.12455-48-laurent.pinchart@ideasonboard.com
This commit is contained in:
committed by
Tomi Valkeinen
parent
825281cd6b
commit
76777d6c30
@@ -287,9 +287,7 @@ static bool dpi_dss_clk_calc(struct dpi_data *dpi, unsigned long pck,
|
||||
|
||||
|
||||
|
||||
static int dpi_set_pll_clk(struct dpi_data *dpi, enum omap_channel channel,
|
||||
unsigned long pck_req, unsigned long *fck, int *lck_div,
|
||||
int *pck_div)
|
||||
static int dpi_set_pll_clk(struct dpi_data *dpi, unsigned long pck_req)
|
||||
{
|
||||
struct dpi_clk_calc_ctx ctx;
|
||||
int r;
|
||||
@@ -303,19 +301,15 @@ static int dpi_set_pll_clk(struct dpi_data *dpi, enum omap_channel channel,
|
||||
if (r)
|
||||
return r;
|
||||
|
||||
dss_select_lcd_clk_source(dpi->dss, channel, dpi->clk_src);
|
||||
dss_select_lcd_clk_source(dpi->dss, dpi->output.dispc_channel,
|
||||
dpi->clk_src);
|
||||
|
||||
dpi->mgr_config.clock_info = ctx.dispc_cinfo;
|
||||
|
||||
*fck = ctx.pll_cinfo.clkout[ctx.clkout_idx];
|
||||
*lck_div = ctx.dispc_cinfo.lck_div;
|
||||
*pck_div = ctx.dispc_cinfo.pck_div;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int dpi_set_dispc_clk(struct dpi_data *dpi, unsigned long pck_req,
|
||||
unsigned long *fck, int *lck_div, int *pck_div)
|
||||
static int dpi_set_dispc_clk(struct dpi_data *dpi, unsigned long pck_req)
|
||||
{
|
||||
struct dpi_clk_calc_ctx ctx;
|
||||
int r;
|
||||
@@ -331,29 +325,19 @@ static int dpi_set_dispc_clk(struct dpi_data *dpi, unsigned long pck_req,
|
||||
|
||||
dpi->mgr_config.clock_info = ctx.dispc_cinfo;
|
||||
|
||||
*fck = ctx.fck;
|
||||
*lck_div = ctx.dispc_cinfo.lck_div;
|
||||
*pck_div = ctx.dispc_cinfo.pck_div;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int dpi_set_mode(struct dpi_data *dpi)
|
||||
{
|
||||
int lck_div = 0, pck_div = 0;
|
||||
unsigned long fck = 0;
|
||||
int r = 0;
|
||||
int r;
|
||||
|
||||
if (dpi->pll)
|
||||
r = dpi_set_pll_clk(dpi, dpi->output.dispc_channel,
|
||||
dpi->pixelclock, &fck, &lck_div, &pck_div);
|
||||
r = dpi_set_pll_clk(dpi, dpi->pixelclock);
|
||||
else
|
||||
r = dpi_set_dispc_clk(dpi, dpi->pixelclock, &fck,
|
||||
&lck_div, &pck_div);
|
||||
if (r)
|
||||
return r;
|
||||
r = dpi_set_dispc_clk(dpi, dpi->pixelclock);
|
||||
|
||||
return 0;
|
||||
return r;
|
||||
}
|
||||
|
||||
static void dpi_config_lcd_manager(struct dpi_data *dpi)
|
||||
|
||||
Reference in New Issue
Block a user