* [PATCH 1/2] drm/i915: handle sdvo input pixel multiplier correctly again
@ 2013-09-03 18:40 Daniel Vetter
2013-09-03 18:40 ` [PATCH 2/2] drm/i915: fix i9xx_crtc_clock_get for multiplied pixels Daniel Vetter
2013-09-03 18:53 ` [PATCH 1/2] drm/i915: handle sdvo input pixel multiplier correctly again Ville Syrjälä
0 siblings, 2 replies; 4+ messages in thread
From: Daniel Vetter @ 2013-09-03 18:40 UTC (permalink / raw)
To: Intel Graphics Development; +Cc: Daniel Vetter
The sdvo input timing needs to be the actual mode, the sdvo
encoder automatically adjusts for the need of pixel doubling or
quadrupling. This was lost in pipe config conversion of the
pixel multiplier in
commit 6cc5f341b5830541a1b6945435ca90c69b1b8b21
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date: Wed Mar 27 00:44:53 2013 +0100
drm/i915: add pipe_config->pixel_multiplier
While at it ditch the intel_ prefix from the crtc in
intel_sdvo_mode_set.
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
drivers/gpu/drm/i915/intel_sdvo.c | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
index 317e058..85037b9 100644
--- a/drivers/gpu/drm/i915/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
@@ -1151,11 +1151,10 @@ static void intel_sdvo_mode_set(struct intel_encoder *intel_encoder)
{
struct drm_device *dev = intel_encoder->base.dev;
struct drm_i915_private *dev_priv = dev->dev_private;
- struct drm_crtc *crtc = intel_encoder->base.crtc;
- struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
+ struct intel_crtc *crtc = to_intel_crtc(intel_encoder->base.crtc);
struct drm_display_mode *adjusted_mode =
- &intel_crtc->config.adjusted_mode;
- struct drm_display_mode *mode = &intel_crtc->config.requested_mode;
+ &crtc->config.adjusted_mode;
+ struct drm_display_mode *mode = &crtc->config.requested_mode;
struct intel_sdvo *intel_sdvo = to_sdvo(intel_encoder);
u32 sdvox;
struct intel_sdvo_in_out_map in_out;
@@ -1213,13 +1212,15 @@ static void intel_sdvo_mode_set(struct intel_encoder *intel_encoder)
* adjusted_mode.
*/
intel_sdvo_get_dtd_from_mode(&input_dtd, adjusted_mode);
+ input_dtd.part1.clock /= crtc->config.pixel_multiplier;
+
if (intel_sdvo->is_tv || intel_sdvo->is_lvds)
input_dtd.part2.sdvo_flags = intel_sdvo->dtd_sdvo_flags;
if (!intel_sdvo_set_input_timing(intel_sdvo, &input_dtd))
DRM_INFO("Setting input timings on %s failed\n",
SDVO_NAME(intel_sdvo));
- switch (intel_crtc->config.pixel_multiplier) {
+ switch (crtc->config.pixel_multiplier) {
default:
WARN(1, "unknown pixel mutlipler specified\n");
case 1: rate = SDVO_CLOCK_RATE_MULT_1X; break;
@@ -1252,9 +1253,9 @@ static void intel_sdvo_mode_set(struct intel_encoder *intel_encoder)
}
if (INTEL_PCH_TYPE(dev) >= PCH_CPT)
- sdvox |= SDVO_PIPE_SEL_CPT(intel_crtc->pipe);
+ sdvox |= SDVO_PIPE_SEL_CPT(crtc->pipe);
else
- sdvox |= SDVO_PIPE_SEL(intel_crtc->pipe);
+ sdvox |= SDVO_PIPE_SEL(crtc->pipe);
if (intel_sdvo->has_hdmi_audio)
sdvox |= SDVO_AUDIO_ENABLE;
@@ -1264,7 +1265,7 @@ static void intel_sdvo_mode_set(struct intel_encoder *intel_encoder)
} else if (IS_I945G(dev) || IS_I945GM(dev) || IS_G33(dev)) {
/* done in crtc_mode_set as it lives inside the dpll register */
} else {
- sdvox |= (intel_crtc->config.pixel_multiplier - 1)
+ sdvox |= (crtc->config.pixel_multiplier - 1)
<< SDVO_PORT_MULTIPLY_SHIFT;
}
--
1.8.3.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] drm/i915: fix i9xx_crtc_clock_get for multiplied pixels
2013-09-03 18:40 [PATCH 1/2] drm/i915: handle sdvo input pixel multiplier correctly again Daniel Vetter
@ 2013-09-03 18:40 ` Daniel Vetter
2013-09-03 18:53 ` [PATCH 1/2] drm/i915: handle sdvo input pixel multiplier correctly again Ville Syrjälä
1 sibling, 0 replies; 4+ messages in thread
From: Daniel Vetter @ 2013-09-03 18:40 UTC (permalink / raw)
To: Intel Graphics Development; +Cc: Daniel Vetter
The dpll actually runs at the port clock so we don't need
to multiply it again with the pixel multiplier to get the
adjusted_mode.clock. This is in contrast to the ironlake
pixel clock readout code which uses the fdi dotclock: That
one does _not_ run with multiplied pixels.
This issue goes back to the original clock readout code added
in
commit f1f644dc66cbaf5a4c7dcde683361536b41885b9
Author: Jesse Barnes <jbarnes@virtuousgeek.org>
Date: Thu Jun 27 00:39:25 2013 +0300
drm/i915: get mode clock when reading the pipe config v9
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
drivers/gpu/drm/i915/intel_display.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index bcb62fe..1da200e 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -7309,8 +7309,7 @@ static void i9xx_crtc_clock_get(struct intel_crtc *crtc,
}
}
- pipe_config->adjusted_mode.clock = clock.dot *
- pipe_config->pixel_multiplier;
+ pipe_config->adjusted_mode.clock = clock.dot;
}
static void ironlake_crtc_clock_get(struct intel_crtc *crtc,
--
1.8.3.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] drm/i915: handle sdvo input pixel multiplier correctly again
2013-09-03 18:40 [PATCH 1/2] drm/i915: handle sdvo input pixel multiplier correctly again Daniel Vetter
2013-09-03 18:40 ` [PATCH 2/2] drm/i915: fix i9xx_crtc_clock_get for multiplied pixels Daniel Vetter
@ 2013-09-03 18:53 ` Ville Syrjälä
2013-09-03 19:15 ` Daniel Vetter
1 sibling, 1 reply; 4+ messages in thread
From: Ville Syrjälä @ 2013-09-03 18:53 UTC (permalink / raw)
To: Daniel Vetter; +Cc: Intel Graphics Development
On Tue, Sep 03, 2013 at 08:40:36PM +0200, Daniel Vetter wrote:
> The sdvo input timing needs to be the actual mode, the sdvo
> encoder automatically adjusts for the need of pixel doubling or
> quadrupling. This was lost in pipe config conversion of the
> pixel multiplier in
>
> commit 6cc5f341b5830541a1b6945435ca90c69b1b8b21
> Author: Daniel Vetter <daniel.vetter@ffwll.ch>
> Date: Wed Mar 27 00:44:53 2013 +0100
>
> drm/i915: add pipe_config->pixel_multiplier
>
> While at it ditch the intel_ prefix from the crtc in
> intel_sdvo_mode_set.
>
> Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
For both patches:
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
--
Ville Syrjälä
Intel OTC
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] drm/i915: handle sdvo input pixel multiplier correctly again
2013-09-03 18:53 ` [PATCH 1/2] drm/i915: handle sdvo input pixel multiplier correctly again Ville Syrjälä
@ 2013-09-03 19:15 ` Daniel Vetter
0 siblings, 0 replies; 4+ messages in thread
From: Daniel Vetter @ 2013-09-03 19:15 UTC (permalink / raw)
To: Ville Syrjälä; +Cc: Daniel Vetter, Intel Graphics Development
On Tue, Sep 03, 2013 at 09:53:15PM +0300, Ville Syrjälä wrote:
> On Tue, Sep 03, 2013 at 08:40:36PM +0200, Daniel Vetter wrote:
> > The sdvo input timing needs to be the actual mode, the sdvo
> > encoder automatically adjusts for the need of pixel doubling or
> > quadrupling. This was lost in pipe config conversion of the
> > pixel multiplier in
> >
> > commit 6cc5f341b5830541a1b6945435ca90c69b1b8b21
> > Author: Daniel Vetter <daniel.vetter@ffwll.ch>
> > Date: Wed Mar 27 00:44:53 2013 +0100
> >
> > drm/i915: add pipe_config->pixel_multiplier
> >
> > While at it ditch the intel_ prefix from the crtc in
> > intel_sdvo_mode_set.
> >
> > Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
> > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
>
> For both patches:
> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Picked up for -fixes, thanks for the review. I'll also rebase dinq so that
we can slurp in your patches on top of this.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-09-03 19:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-03 18:40 [PATCH 1/2] drm/i915: handle sdvo input pixel multiplier correctly again Daniel Vetter
2013-09-03 18:40 ` [PATCH 2/2] drm/i915: fix i9xx_crtc_clock_get for multiplied pixels Daniel Vetter
2013-09-03 18:53 ` [PATCH 1/2] drm/i915: handle sdvo input pixel multiplier correctly again Ville Syrjälä
2013-09-03 19:15 ` Daniel Vetter
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.