Commit a8dc5ed6 authored by Gustavo Padovan's avatar Gustavo Padovan Committed by Inki Dae

drm/exynos: don't duplicate drm_display_mode in fimd context

We can safely use the mode stored in the crtc.
Signed-off-by: default avatarGustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
parent 93bca243
...@@ -89,7 +89,6 @@ exynos_drm_crtc_mode_set(struct drm_crtc *crtc, struct drm_display_mode *mode, ...@@ -89,7 +89,6 @@ exynos_drm_crtc_mode_set(struct drm_crtc *crtc, struct drm_display_mode *mode,
struct drm_display_mode *adjusted_mode, int x, int y, struct drm_display_mode *adjusted_mode, int x, int y,
struct drm_framebuffer *old_fb) struct drm_framebuffer *old_fb)
{ {
struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc);
struct drm_framebuffer *fb = crtc->primary->fb; struct drm_framebuffer *fb = crtc->primary->fb;
unsigned int crtc_w; unsigned int crtc_w;
unsigned int crtc_h; unsigned int crtc_h;
...@@ -102,10 +101,6 @@ exynos_drm_crtc_mode_set(struct drm_crtc *crtc, struct drm_display_mode *mode, ...@@ -102,10 +101,6 @@ exynos_drm_crtc_mode_set(struct drm_crtc *crtc, struct drm_display_mode *mode,
crtc_w = fb->width - x; crtc_w = fb->width - x;
crtc_h = fb->height - y; crtc_h = fb->height - y;
if (exynos_crtc->ops->mode_set)
exynos_crtc->ops->mode_set(exynos_crtc, &crtc->mode);
return exynos_plane_mode_set(crtc->primary, crtc, fb, 0, 0, return exynos_plane_mode_set(crtc->primary, crtc, fb, 0, 0,
crtc_w, crtc_h, x, y, crtc_w, crtc_h); crtc_w, crtc_h, x, y, crtc_w, crtc_h);
} }
......
...@@ -164,7 +164,6 @@ struct fimd_context { ...@@ -164,7 +164,6 @@ struct fimd_context {
struct clk *lcd_clk; struct clk *lcd_clk;
void __iomem *regs; void __iomem *regs;
struct regmap *sysreg; struct regmap *sysreg;
struct drm_display_mode mode;
struct fimd_win_data win_data[WINDOWS_NR]; struct fimd_win_data win_data[WINDOWS_NR];
unsigned int default_win; unsigned int default_win;
unsigned long irq_flags; unsigned long irq_flags;
...@@ -345,18 +344,10 @@ static bool fimd_mode_fixup(struct exynos_drm_crtc *crtc, ...@@ -345,18 +344,10 @@ static bool fimd_mode_fixup(struct exynos_drm_crtc *crtc,
return true; return true;
} }
static void fimd_mode_set(struct exynos_drm_crtc *crtc,
const struct drm_display_mode *in_mode)
{
struct fimd_context *ctx = crtc->ctx;
drm_mode_copy(&ctx->mode, in_mode);
}
static void fimd_commit(struct exynos_drm_crtc *crtc) static void fimd_commit(struct exynos_drm_crtc *crtc)
{ {
struct fimd_context *ctx = crtc->ctx; struct fimd_context *ctx = crtc->ctx;
struct drm_display_mode *mode = &ctx->mode; struct drm_display_mode *mode = &crtc->base.mode;
struct fimd_driver_data *driver_data = ctx->driver_data; struct fimd_driver_data *driver_data = ctx->driver_data;
void *timing_base = ctx->regs + driver_data->timing_base; void *timing_base = ctx->regs + driver_data->timing_base;
u32 val, clkdiv; u32 val, clkdiv;
...@@ -1016,7 +1007,6 @@ static void fimd_te_handler(struct exynos_drm_crtc *crtc) ...@@ -1016,7 +1007,6 @@ static void fimd_te_handler(struct exynos_drm_crtc *crtc)
static struct exynos_drm_crtc_ops fimd_crtc_ops = { static struct exynos_drm_crtc_ops fimd_crtc_ops = {
.dpms = fimd_dpms, .dpms = fimd_dpms,
.mode_fixup = fimd_mode_fixup, .mode_fixup = fimd_mode_fixup,
.mode_set = fimd_mode_set,
.commit = fimd_commit, .commit = fimd_commit,
.enable_vblank = fimd_enable_vblank, .enable_vblank = fimd_enable_vblank,
.disable_vblank = fimd_disable_vblank, .disable_vblank = fimd_disable_vblank,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment