* [PATCH 2/2] drm/i915: don't always force the panel's fixed_mode
@ 2012-02-03 19:48 Paulo Zanoni
2012-02-08 22:53 ` Daniel Vetter
0 siblings, 1 reply; 3+ messages in thread
From: Paulo Zanoni @ 2012-02-03 19:48 UTC (permalink / raw)
To: intel-gfx; +Cc: Paulo Zanoni
From: Paulo Zanoni <paulo.r.zanoni@intel.com>
My laptop has two 1440x900 modes: one is the fixed_mode and the other
has different timings. If I use xrandr to switch from the fixed mode to
the "other" 1440x900 mode, xrandr will tell me the change was
successful, but nothing was actually done: I'm still using the
fixed_mode. This patch allows us to use other modes if hdisplay and
vdisplay are the same.
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
---
drivers/gpu/drm/i915/intel_panel.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
Apply on top of danvet's interlaced branch.
diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c
index 230a141..62ca771 100644
--- a/drivers/gpu/drm/i915/intel_panel.c
+++ b/drivers/gpu/drm/i915/intel_panel.c
@@ -36,6 +36,12 @@ void
intel_fixed_panel_mode(struct drm_display_mode *fixed_mode,
struct drm_display_mode *adjusted_mode)
{
+ /* Allow modes that match the panel fixed_mode resolution but have
+ * different timings */
+ if (adjusted_mode->hdisplay == fixed_mode->hdisplay &&
+ adjusted_mode->vdisplay == fixed_mode->vdisplay)
+ return;
+
adjusted_mode->hdisplay = fixed_mode->hdisplay;
adjusted_mode->hsync_start = fixed_mode->hsync_start;
adjusted_mode->hsync_end = fixed_mode->hsync_end;
--
1.7.8.3
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH 2/2] drm/i915: don't always force the panel's fixed_mode
2012-02-03 19:48 [PATCH 2/2] drm/i915: don't always force the panel's fixed_mode Paulo Zanoni
@ 2012-02-08 22:53 ` Daniel Vetter
2012-02-08 23:18 ` Chris Wilson
0 siblings, 1 reply; 3+ messages in thread
From: Daniel Vetter @ 2012-02-08 22:53 UTC (permalink / raw)
To: Paulo Zanoni; +Cc: intel-gfx, Paulo Zanoni
On Fri, Feb 03, 2012 at 05:48:21PM -0200, Paulo Zanoni wrote:
> From: Paulo Zanoni <paulo.r.zanoni@intel.com>
>
> My laptop has two 1440x900 modes: one is the fixed_mode and the other
> has different timings. If I use xrandr to switch from the fixed mode to
> the "other" 1440x900 mode, xrandr will tell me the change was
> successful, but nothing was actually done: I'm still using the
> fixed_mode. This patch allows us to use other modes if hdisplay and
> vdisplay are the same.
>
> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Hm, I've thought we should only use this to dynamically switch between a
mode with high refresh rate and one with a low one. Otoh we have a bunch
of boards where we need a generic 'ignore lvds fixed mode because it's
actually not a panel' - I think that would be slightly more useful since
we could then quirk that. But who knows, I don't have much clue ...
-Daniel
--
Daniel Vetter
Mail: daniel@ffwll.ch
Mobile: +41 (0)79 365 57 48
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 2/2] drm/i915: don't always force the panel's fixed_mode
2012-02-08 22:53 ` Daniel Vetter
@ 2012-02-08 23:18 ` Chris Wilson
0 siblings, 0 replies; 3+ messages in thread
From: Chris Wilson @ 2012-02-08 23:18 UTC (permalink / raw)
To: Daniel Vetter, Paulo Zanoni; +Cc: intel-gfx, Paulo Zanoni
On Wed, 8 Feb 2012 23:53:10 +0100, Daniel Vetter <daniel@ffwll.ch> wrote:
> On Fri, Feb 03, 2012 at 05:48:21PM -0200, Paulo Zanoni wrote:
> > From: Paulo Zanoni <paulo.r.zanoni@intel.com>
> >
> > My laptop has two 1440x900 modes: one is the fixed_mode and the other
> > has different timings. If I use xrandr to switch from the fixed mode to
> > the "other" 1440x900 mode, xrandr will tell me the change was
> > successful, but nothing was actually done: I'm still using the
> > fixed_mode. This patch allows us to use other modes if hdisplay and
> > vdisplay are the same.
> >
> > Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
>
> Hm, I've thought we should only use this to dynamically switch between a
> mode with high refresh rate and one with a low one.
I hesitated for the same reason. Except that by filtering out all modes
except for the one true mode, we prevent the user from being able to
make a choice. They'll invariably make the wrong choice and file a bug,
but nevertheless... ;-)
I also don't think this is the way we want to approach this. The overrides
required for fake LVDS headers would seem to be a superset of this
functionality.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-02-08 23:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-03 19:48 [PATCH 2/2] drm/i915: don't always force the panel's fixed_mode Paulo Zanoni
2012-02-08 22:53 ` Daniel Vetter
2012-02-08 23:18 ` Chris Wilson
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.