Skip to content

Commit

Permalink
drm/exynos: fimd: Hold pointer to driver data in context struct
Browse files Browse the repository at this point in the history
This patch adds pointer to driver data to fimd_context structure, to
remove the need to call drm_fimd_get_driver_data() each time access to
driver data is necessary.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
Acked-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
  • Loading branch information
Tomasz Figa authored and Inki Dae committed Jun 28, 2013
1 parent 7fd65df commit 1887346
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/gpu/drm/exynos/exynos_drm_fimd.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ struct fimd_context {
atomic_t wait_vsync_event;

struct exynos_drm_panel_info *panel;
struct fimd_driver_data *driver_data;
};

#ifdef CONFIG_OF
Expand Down Expand Up @@ -239,10 +240,9 @@ static void fimd_commit(struct device *dev)
struct exynos_drm_panel_info *panel = ctx->panel;
struct fb_videomode *timing = &panel->timing;
struct fimd_driver_data *driver_data;
struct platform_device *pdev = to_platform_device(dev);
u32 val;

driver_data = drm_fimd_get_driver_data(pdev);
driver_data = ctx->driver_data;
if (ctx->suspended)
return;

Expand Down Expand Up @@ -949,6 +949,7 @@ static int fimd_probe(struct platform_device *pdev)
return ret;
}

ctx->driver_data = drm_fimd_get_driver_data(pdev);
ctx->vidcon0 = pdata->vidcon0;
ctx->vidcon1 = pdata->vidcon1;
ctx->default_win = pdata->default_win;
Expand Down

0 comments on commit 1887346

Please sign in to comment.