mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-19 19:38:58 +07:00
drm/omap: DSI: remove uses of omap_overlay_manager
We are removing the uses of 'struct omap_overlay_manager'. This patch changes DSI driver to use 'omap_channel' instead. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
This commit is contained in:
parent
532a2cba7a
commit
0674d38627
@ -214,9 +214,9 @@ struct dsi_reg { u16 module; u16 idx; };
|
|||||||
typedef void (*omap_dsi_isr_t) (void *arg, u32 mask);
|
typedef void (*omap_dsi_isr_t) (void *arg, u32 mask);
|
||||||
|
|
||||||
static int dsi_display_init_dispc(struct platform_device *dsidev,
|
static int dsi_display_init_dispc(struct platform_device *dsidev,
|
||||||
struct omap_overlay_manager *mgr);
|
enum omap_channel channel);
|
||||||
static void dsi_display_uninit_dispc(struct platform_device *dsidev,
|
static void dsi_display_uninit_dispc(struct platform_device *dsidev,
|
||||||
struct omap_overlay_manager *mgr);
|
enum omap_channel channel);
|
||||||
|
|
||||||
static int dsi_vc_send_null(struct omap_dss_device *dssdev, int channel);
|
static int dsi_vc_send_null(struct omap_dss_device *dssdev, int channel);
|
||||||
|
|
||||||
@ -3826,7 +3826,7 @@ static int dsi_enable_video_output(struct omap_dss_device *dssdev, int channel)
|
|||||||
{
|
{
|
||||||
struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev);
|
struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev);
|
||||||
struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
|
struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
|
||||||
struct omap_overlay_manager *mgr = dsi->output.manager;
|
enum omap_channel dispc_channel = dssdev->dispc_channel;
|
||||||
int bpp = dsi_get_pixel_size(dsi->pix_fmt);
|
int bpp = dsi_get_pixel_size(dsi->pix_fmt);
|
||||||
struct omap_dss_device *out = &dsi->output;
|
struct omap_dss_device *out = &dsi->output;
|
||||||
u8 data_type;
|
u8 data_type;
|
||||||
@ -3838,7 +3838,7 @@ static int dsi_enable_video_output(struct omap_dss_device *dssdev, int channel)
|
|||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
r = dsi_display_init_dispc(dsidev, mgr);
|
r = dsi_display_init_dispc(dsidev, dispc_channel);
|
||||||
if (r)
|
if (r)
|
||||||
goto err_init_dispc;
|
goto err_init_dispc;
|
||||||
|
|
||||||
@ -3876,7 +3876,7 @@ static int dsi_enable_video_output(struct omap_dss_device *dssdev, int channel)
|
|||||||
dsi_if_enable(dsidev, true);
|
dsi_if_enable(dsidev, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
r = dss_mgr_enable(mgr->id);
|
r = dss_mgr_enable(dispc_channel);
|
||||||
if (r)
|
if (r)
|
||||||
goto err_mgr_enable;
|
goto err_mgr_enable;
|
||||||
|
|
||||||
@ -3888,7 +3888,7 @@ static int dsi_enable_video_output(struct omap_dss_device *dssdev, int channel)
|
|||||||
dsi_vc_enable(dsidev, channel, false);
|
dsi_vc_enable(dsidev, channel, false);
|
||||||
}
|
}
|
||||||
err_pix_fmt:
|
err_pix_fmt:
|
||||||
dsi_display_uninit_dispc(dsidev, mgr);
|
dsi_display_uninit_dispc(dsidev, dispc_channel);
|
||||||
err_init_dispc:
|
err_init_dispc:
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
@ -3897,7 +3897,7 @@ static void dsi_disable_video_output(struct omap_dss_device *dssdev, int channel
|
|||||||
{
|
{
|
||||||
struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev);
|
struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev);
|
||||||
struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
|
struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
|
||||||
struct omap_overlay_manager *mgr = dsi->output.manager;
|
enum omap_channel dispc_channel = dssdev->dispc_channel;
|
||||||
|
|
||||||
if (dsi->mode == OMAP_DSS_DSI_VIDEO_MODE) {
|
if (dsi->mode == OMAP_DSS_DSI_VIDEO_MODE) {
|
||||||
dsi_if_enable(dsidev, false);
|
dsi_if_enable(dsidev, false);
|
||||||
@ -3910,15 +3910,15 @@ static void dsi_disable_video_output(struct omap_dss_device *dssdev, int channel
|
|||||||
dsi_if_enable(dsidev, true);
|
dsi_if_enable(dsidev, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
dss_mgr_disable(mgr->id);
|
dss_mgr_disable(dispc_channel);
|
||||||
|
|
||||||
dsi_display_uninit_dispc(dsidev, mgr);
|
dsi_display_uninit_dispc(dsidev, dispc_channel);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void dsi_update_screen_dispc(struct platform_device *dsidev)
|
static void dsi_update_screen_dispc(struct platform_device *dsidev)
|
||||||
{
|
{
|
||||||
struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
|
struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
|
||||||
struct omap_overlay_manager *mgr = dsi->output.manager;
|
enum omap_channel dispc_channel = dsi->output.dispc_channel;
|
||||||
unsigned bytespp;
|
unsigned bytespp;
|
||||||
unsigned bytespl;
|
unsigned bytespl;
|
||||||
unsigned bytespf;
|
unsigned bytespf;
|
||||||
@ -3980,9 +3980,9 @@ static void dsi_update_screen_dispc(struct platform_device *dsidev)
|
|||||||
msecs_to_jiffies(250));
|
msecs_to_jiffies(250));
|
||||||
BUG_ON(r == 0);
|
BUG_ON(r == 0);
|
||||||
|
|
||||||
dss_mgr_set_timings(mgr->id, &dsi->timings);
|
dss_mgr_set_timings(dispc_channel, &dsi->timings);
|
||||||
|
|
||||||
dss_mgr_start_update(mgr->id);
|
dss_mgr_start_update(dispc_channel);
|
||||||
|
|
||||||
if (dsi->te_enabled) {
|
if (dsi->te_enabled) {
|
||||||
/* disable LP_RX_TO, so that we can receive TE. Time to wait
|
/* disable LP_RX_TO, so that we can receive TE. Time to wait
|
||||||
@ -4105,17 +4105,17 @@ static int dsi_configure_dispc_clocks(struct platform_device *dsidev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int dsi_display_init_dispc(struct platform_device *dsidev,
|
static int dsi_display_init_dispc(struct platform_device *dsidev,
|
||||||
struct omap_overlay_manager *mgr)
|
enum omap_channel channel)
|
||||||
{
|
{
|
||||||
struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
|
struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
dss_select_lcd_clk_source(mgr->id, dsi->module_id == 0 ?
|
dss_select_lcd_clk_source(channel, dsi->module_id == 0 ?
|
||||||
OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC :
|
OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC :
|
||||||
OMAP_DSS_CLK_SRC_DSI2_PLL_HSDIV_DISPC);
|
OMAP_DSS_CLK_SRC_DSI2_PLL_HSDIV_DISPC);
|
||||||
|
|
||||||
if (dsi->mode == OMAP_DSS_DSI_CMD_MODE) {
|
if (dsi->mode == OMAP_DSS_DSI_CMD_MODE) {
|
||||||
r = dss_mgr_register_framedone_handler(mgr->id,
|
r = dss_mgr_register_framedone_handler(channel,
|
||||||
dsi_framedone_irq_callback, dsidev);
|
dsi_framedone_irq_callback, dsidev);
|
||||||
if (r) {
|
if (r) {
|
||||||
DSSERR("can't register FRAMEDONE handler\n");
|
DSSERR("can't register FRAMEDONE handler\n");
|
||||||
@ -4140,7 +4140,7 @@ static int dsi_display_init_dispc(struct platform_device *dsidev,
|
|||||||
dsi->timings.de_level = OMAPDSS_SIG_ACTIVE_HIGH;
|
dsi->timings.de_level = OMAPDSS_SIG_ACTIVE_HIGH;
|
||||||
dsi->timings.sync_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE;
|
dsi->timings.sync_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE;
|
||||||
|
|
||||||
dss_mgr_set_timings(mgr->id, &dsi->timings);
|
dss_mgr_set_timings(channel, &dsi->timings);
|
||||||
|
|
||||||
r = dsi_configure_dispc_clocks(dsidev);
|
r = dsi_configure_dispc_clocks(dsidev);
|
||||||
if (r)
|
if (r)
|
||||||
@ -4151,28 +4151,28 @@ static int dsi_display_init_dispc(struct platform_device *dsidev,
|
|||||||
dsi_get_pixel_size(dsi->pix_fmt);
|
dsi_get_pixel_size(dsi->pix_fmt);
|
||||||
dsi->mgr_config.lcden_sig_polarity = 0;
|
dsi->mgr_config.lcden_sig_polarity = 0;
|
||||||
|
|
||||||
dss_mgr_set_lcd_config(mgr->id, &dsi->mgr_config);
|
dss_mgr_set_lcd_config(channel, &dsi->mgr_config);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
err1:
|
err1:
|
||||||
if (dsi->mode == OMAP_DSS_DSI_CMD_MODE)
|
if (dsi->mode == OMAP_DSS_DSI_CMD_MODE)
|
||||||
dss_mgr_unregister_framedone_handler(mgr->id,
|
dss_mgr_unregister_framedone_handler(channel,
|
||||||
dsi_framedone_irq_callback, dsidev);
|
dsi_framedone_irq_callback, dsidev);
|
||||||
err:
|
err:
|
||||||
dss_select_lcd_clk_source(mgr->id, OMAP_DSS_CLK_SRC_FCK);
|
dss_select_lcd_clk_source(channel, OMAP_DSS_CLK_SRC_FCK);
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void dsi_display_uninit_dispc(struct platform_device *dsidev,
|
static void dsi_display_uninit_dispc(struct platform_device *dsidev,
|
||||||
struct omap_overlay_manager *mgr)
|
enum omap_channel channel)
|
||||||
{
|
{
|
||||||
struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
|
struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
|
||||||
|
|
||||||
if (dsi->mode == OMAP_DSS_DSI_CMD_MODE)
|
if (dsi->mode == OMAP_DSS_DSI_CMD_MODE)
|
||||||
dss_mgr_unregister_framedone_handler(mgr->id,
|
dss_mgr_unregister_framedone_handler(channel,
|
||||||
dsi_framedone_irq_callback, dsidev);
|
dsi_framedone_irq_callback, dsidev);
|
||||||
|
|
||||||
dss_select_lcd_clk_source(mgr->id, OMAP_DSS_CLK_SRC_FCK);
|
dss_select_lcd_clk_source(channel, OMAP_DSS_CLK_SRC_FCK);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int dsi_configure_dsi_clocks(struct platform_device *dsidev)
|
static int dsi_configure_dsi_clocks(struct platform_device *dsidev)
|
||||||
@ -4983,18 +4983,14 @@ static int dsi_connect(struct omap_dss_device *dssdev,
|
|||||||
struct omap_dss_device *dst)
|
struct omap_dss_device *dst)
|
||||||
{
|
{
|
||||||
struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev);
|
struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev);
|
||||||
struct omap_overlay_manager *mgr;
|
enum omap_channel dispc_channel = dssdev->dispc_channel;
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
r = dsi_regulator_init(dsidev);
|
r = dsi_regulator_init(dsidev);
|
||||||
if (r)
|
if (r)
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
mgr = omap_dss_get_overlay_manager(dssdev->dispc_channel);
|
r = dss_mgr_connect(dispc_channel, dssdev);
|
||||||
if (!mgr)
|
|
||||||
return -ENODEV;
|
|
||||||
|
|
||||||
r = dss_mgr_connect(mgr->id, dssdev);
|
|
||||||
if (r)
|
if (r)
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
@ -5002,7 +4998,7 @@ static int dsi_connect(struct omap_dss_device *dssdev,
|
|||||||
if (r) {
|
if (r) {
|
||||||
DSSERR("failed to connect output to new device: %s\n",
|
DSSERR("failed to connect output to new device: %s\n",
|
||||||
dssdev->name);
|
dssdev->name);
|
||||||
dss_mgr_disconnect(mgr->id, dssdev);
|
dss_mgr_disconnect(dispc_channel, dssdev);
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5012,6 +5008,8 @@ static int dsi_connect(struct omap_dss_device *dssdev,
|
|||||||
static void dsi_disconnect(struct omap_dss_device *dssdev,
|
static void dsi_disconnect(struct omap_dss_device *dssdev,
|
||||||
struct omap_dss_device *dst)
|
struct omap_dss_device *dst)
|
||||||
{
|
{
|
||||||
|
enum omap_channel dispc_channel = dssdev->dispc_channel;
|
||||||
|
|
||||||
WARN_ON(dst != dssdev->dst);
|
WARN_ON(dst != dssdev->dst);
|
||||||
|
|
||||||
if (dst != dssdev->dst)
|
if (dst != dssdev->dst)
|
||||||
@ -5019,7 +5017,7 @@ static void dsi_disconnect(struct omap_dss_device *dssdev,
|
|||||||
|
|
||||||
omapdss_output_unset_device(dssdev);
|
omapdss_output_unset_device(dssdev);
|
||||||
|
|
||||||
dss_mgr_disconnect(dssdev->manager->id, dssdev);
|
dss_mgr_disconnect(dispc_channel, dssdev);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct omapdss_dsi_ops dsi_ops = {
|
static const struct omapdss_dsi_ops dsi_ops = {
|
||||||
|
Loading…
Reference in New Issue
Block a user