History

drm/exynos/dsi: remove mode_set callback

The callback was used only to copy provided mode to context for later usage. Since the mode is always available from crtc atomic state this code can be removed.

Andrzej Hajda committed 8 years ago

Commit e8929991 parent 01fb9181 file · +10 −30Browse files

Unified · Split

drivers/gpu/drm/exynos/exynos_drm_dsi.c+10−30
@@ -270,7 +270,6 @@ struct exynos_dsi { · 269 unmodified lines
270270 u32 lanes;
271271 u32 mode_flags;
272272 u32 format;
273− struct videomode vm;
274273
275274 int state;
276275 struct drm_property *brightness;
@@ -881,30 +880,30 @@ static int exynos_dsi_init_link(struct exynos_dsi *dsi) · 604 unmodified lines
881880
882881 static void exynos_dsi_set_display_mode(struct exynos_dsi *dsi)
883882 {
884− struct videomode *vm = &dsi->vm;
883+ struct drm_display_mode *m = &dsi->encoder.crtc->state->adjusted_mode;
885884 unsigned int num_bits_resol = dsi->driver_data->num_bits_resol;
886885 u32 reg;
887886
888887 if (dsi->mode_flags & MIPI_DSI_MODE_VIDEO) {
889888 reg = DSIM_CMD_ALLOW(0xf)
890− | DSIM_STABLE_VFP(vm->vfront_porch)
891− | DSIM_MAIN_VBP(vm->vback_porch);
889+ | DSIM_STABLE_VFP(m->vsync_start - m->vdisplay)
890+ | DSIM_MAIN_VBP(m->vtotal - m->vsync_end);
892891 exynos_dsi_write(dsi, DSIM_MVPORCH_REG, reg);
893892
894− reg = DSIM_MAIN_HFP(vm->hfront_porch)
895− | DSIM_MAIN_HBP(vm->hback_porch);
893+ reg = DSIM_MAIN_HFP(m->hsync_start - m->hdisplay)
894+ | DSIM_MAIN_HBP(m->htotal - m->hsync_end);
896895 exynos_dsi_write(dsi, DSIM_MHPORCH_REG, reg);
897896
898− reg = DSIM_MAIN_VSA(vm->vsync_len)
899− | DSIM_MAIN_HSA(vm->hsync_len);
897+ reg = DSIM_MAIN_VSA(m->vsync_end - m->vsync_start)
898+ | DSIM_MAIN_HSA(m->hsync_end - m->hsync_start);
900899 exynos_dsi_write(dsi, DSIM_MSYNC_REG, reg);
901900 }
902− reg = DSIM_MAIN_HRESOL(vm->hactive, num_bits_resol) |
903− DSIM_MAIN_VRESOL(vm->vactive, num_bits_resol);
901+ reg = DSIM_MAIN_HRESOL(m->hdisplay, num_bits_resol) |
902+ DSIM_MAIN_VRESOL(m->vdisplay, num_bits_resol);
904903
905904 exynos_dsi_write(dsi, DSIM_MDRESOL_REG, reg);
906905
907− dev_dbg(dsi->dev, "LCD size = %dx%d\n", vm->hactive, vm->vactive);
906+ dev_dbg(dsi->dev, "LCD size = %dx%d\n", m->hdisplay, m->vdisplay);
908907 }
909908
910909 static void exynos_dsi_set_display_enable(struct exynos_dsi *dsi, bool enable)
@@ -1485,26 +1484,7 @@ static int exynos_dsi_create_connector(struct drm_encoder *encoder) · 574 unmodified lines
14851484 return 0;
14861485 }
14871486
1488−static void exynos_dsi_mode_set(struct drm_encoder *encoder,
1489− struct drm_display_mode *mode,
1490− struct drm_display_mode *adjusted_mode)
1491−{
1492− struct exynos_dsi *dsi = encoder_to_dsi(encoder);
1493− struct videomode *vm = &dsi->vm;
1494− struct drm_display_mode *m = adjusted_mode;
1495−
1496− vm->hactive = m->hdisplay;
1497− vm->vactive = m->vdisplay;
1498− vm->vfront_porch = m->vsync_start - m->vdisplay;
1499− vm->vback_porch = m->vtotal - m->vsync_end;
1500− vm->vsync_len = m->vsync_end - m->vsync_start;
1501− vm->hfront_porch = m->hsync_start - m->hdisplay;
1502− vm->hback_porch = m->htotal - m->hsync_end;
1503− vm->hsync_len = m->hsync_end - m->hsync_start;
1504−}
1505−
15061487 static const struct drm_encoder_helper_funcs exynos_dsi_encoder_helper_funcs = {
1507− .mode_set = exynos_dsi_mode_set,
15081488 .enable = exynos_dsi_enable,
15091489 .disable = exynos_dsi_disable,
15101490 };

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t