Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1502795
| From | Maxime Ripard <maxime.ripard@free-electrons.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 4/5] drm/sun4i: Compute TCON1 mode from tv mode |
| Date | 2016-10-18 10:40 +0200 |
| Message-ID | <sty6d-7Dr-19@gated-at.bofh.it> (permalink) |
| References | <stxWy-7Ah-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Since the mode passed in mode_set is probably going to be a scaled down
version of the TV mode, we cannot just use it.
Instead, try to retrieve the actual mode we want to set, and generate a drm
mode from that.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
drivers/gpu/drm/sun4i/sun4i_tv.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/sun4i/sun4i_tv.c b/drivers/gpu/drm/sun4i/sun4i_tv.c
index 6f8077013be3..f99886462cb8 100644
--- a/drivers/gpu/drm/sun4i/sun4i_tv.c
+++ b/drivers/gpu/drm/sun4i/sun4i_tv.c
@@ -401,8 +401,13 @@ static void sun4i_tv_mode_set(struct drm_encoder *encoder,
struct sun4i_drv *drv = tv->drv;
struct sun4i_tcon *tcon = drv->tcon;
const struct tv_mode *tv_mode = sun4i_tv_find_tv_by_mode(mode);
+ struct drm_display_mode tv_drm_mode = { 0 };
- sun4i_tcon1_mode_set(tcon, mode);
+ strcpy(tv_drm_mode.name, "TV");
+ sun4i_tv_mode_to_drm_mode(tv_mode, &tv_drm_mode);
+ drm_mode_set_crtcinfo(&tv_drm_mode, CRTC_INTERLACE_HALVE_V);
+
+ sun4i_tcon1_mode_set(tcon, &tv_drm_mode);
/* Enable and map the DAC to the output */
regmap_update_bits(tv->regs, SUN4I_TVE_EN_REG,
--
git-series 0.8.10
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/5] drm/sun4i: Handle TV overscan Maxime Ripard <maxime.ripard@free-electrons.com> - 2016-10-18 10:40 +0200
[PATCH 3/5] drm/sun4i: Add custom crtc state Maxime Ripard <maxime.ripard@free-electrons.com> - 2016-10-18 10:40 +0200
[PATCH 5/5] drm/sun4i: Add support for the overscan profiles Maxime Ripard <maxime.ripard@free-electrons.com> - 2016-10-18 10:40 +0200
[PATCH 2/5] drm/modes: Support modes names on the command line Maxime Ripard <maxime.ripard@free-electrons.com> - 2016-10-18 10:40 +0200
[PATCH 4/5] drm/sun4i: Compute TCON1 mode from tv mode Maxime Ripard <maxime.ripard@free-electrons.com> - 2016-10-18 10:40 +0200
Re: [PATCH 0/5] drm/sun4i: Handle TV overscan Russell King - ARM Linux <linux@armlinux.org.uk> - 2016-10-18 11:30 +0200
Re: [PATCH 0/5] drm/sun4i: Handle TV overscan Maxime Ripard <maxime.ripard@free-electrons.com> - 2016-10-18 12:10 +0200
Re: [PATCH 0/5] drm/sun4i: Handle TV overscan Jean-Francois Moine <moinejf@free.fr> - 2016-10-18 20:00 +0200
csiph-web