* [PATCH] drm/i915: Use the connector name in fbdev debug messages
@ 2014-05-13 12:45 Chris Wilson
2014-05-13 12:51 ` Damien Lespiau
0 siblings, 1 reply; 8+ messages in thread
From: Chris Wilson @ 2014-05-13 12:45 UTC (permalink / raw)
To: intel-gfx
During initial probing of the modes to assign to the fbdev console, we
use the CRTC and connector ids. These are much harder for us to
understand than if we used their actual names (or pipe in the CRTC
case). Similarly, we want to manually print the mode size rather than
rely on mode->name being set.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
drivers/gpu/drm/i915/intel_fbdev.c | 28 ++++++++++++++++------------
1 file changed, 16 insertions(+), 12 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_fbdev.c b/drivers/gpu/drm/i915/intel_fbdev.c
index fbe7941f88c8..3447a04e41e6 100644
--- a/drivers/gpu/drm/i915/intel_fbdev.c
+++ b/drivers/gpu/drm/i915/intel_fbdev.c
@@ -344,14 +344,14 @@ static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper,
num_connectors_detected++;
if (!enabled[i]) {
- DRM_DEBUG_KMS("connector %d not enabled, skipping\n",
- connector->base.id);
+ DRM_DEBUG_KMS("connector %s not enabled, skipping\n",
+ drm_get_connector_name(connector));
continue;
}
if (connector->force == DRM_FORCE_OFF) {
- DRM_DEBUG_KMS("connector %d is disabled by user, skipping\n",
- connector->base.id);
+ DRM_DEBUG_KMS("connector %s is disabled by user, skipping\n",
+ drm_get_connector_name(connector));
enabled[i] = false;
continue;
}
@@ -361,8 +361,8 @@ static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper,
if (connector->force > DRM_FORCE_OFF)
goto bail;
- DRM_DEBUG_KMS("connector %d has no encoder or crtc, skipping\n",
- connector->base.id);
+ DRM_DEBUG_KMS("connector %s has no encoder or crtc, skipping\n",
+ drm_get_connector_name(connector));
enabled[i] = false;
continue;
}
@@ -383,16 +383,16 @@ static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper,
}
}
- DRM_DEBUG_KMS("looking for cmdline mode on connector %d\n",
- fb_conn->connector->base.id);
+ DRM_DEBUG_KMS("looking for cmdline mode on connector %s\n",
+ drm_get_connector_name(connector));
/* go for command line mode first */
modes[i] = drm_pick_cmdline_mode(fb_conn, width, height);
/* try for preferred next */
if (!modes[i]) {
- DRM_DEBUG_KMS("looking for preferred mode on connector %d\n",
- fb_conn->connector->base.id);
+ DRM_DEBUG_KMS("looking for preferred mode on connector %s\n",
+ drm_get_connector_name(connector));
modes[i] = drm_has_preferred_mode(fb_conn, width,
height);
}
@@ -410,16 +410,20 @@ static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper,
* since the fb helper layer wants a pointer to
* something we own.
*/
+ DRM_DEBUG_KMS("looking for current mode on connector %s\n",
+ drm_get_connector_name(connector));
intel_mode_from_pipe_config(&encoder->crtc->hwmode,
&to_intel_crtc(encoder->crtc)->config);
modes[i] = &encoder->crtc->hwmode;
}
crtcs[i] = new_crtc;
- DRM_DEBUG_KMS("connector %s on crtc %d: %s\n",
+ DRM_DEBUG_KMS("connector %s on pipe %d [CRTC:%d]: %dx%d%s\n",
drm_get_connector_name(connector),
+ pipe_name(to_intel_crtc(encoder->crtc)->pipe),
encoder->crtc->base.id,
- modes[i]->name);
+ modes[i]->hdisplay, modes[i]->vdisplay,
+ modes[i]->flags & DRM_MODE_FLAG_INTERLACE ? "i" :"");
fallback = false;
}
--
2.0.0.rc2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] drm/i915: Use the connector name in fbdev debug messages
2014-05-13 12:45 [PATCH] drm/i915: Use the connector name in fbdev debug messages Chris Wilson
@ 2014-05-13 12:51 ` Damien Lespiau
2014-05-13 12:59 ` Chris Wilson
0 siblings, 1 reply; 8+ messages in thread
From: Damien Lespiau @ 2014-05-13 12:51 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
On Tue, May 13, 2014 at 01:45:09PM +0100, Chris Wilson wrote:
> - DRM_DEBUG_KMS("connector %s on crtc %d: %s\n",
> + DRM_DEBUG_KMS("connector %s on pipe %d [CRTC:%d]: %dx%d%s\n",
> drm_get_connector_name(connector),
> + pipe_name(to_intel_crtc(encoder->crtc)->pipe),
pipe_name() gives you a char.
--
Damien
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] drm/i915: Use the connector name in fbdev debug messages
2014-05-13 12:51 ` Damien Lespiau
@ 2014-05-13 12:59 ` Chris Wilson
2014-05-13 13:02 ` Damien Lespiau
0 siblings, 1 reply; 8+ messages in thread
From: Chris Wilson @ 2014-05-13 12:59 UTC (permalink / raw)
To: Damien Lespiau; +Cc: intel-gfx
On Tue, May 13, 2014 at 01:51:46PM +0100, Damien Lespiau wrote:
> On Tue, May 13, 2014 at 01:45:09PM +0100, Chris Wilson wrote:
> > - DRM_DEBUG_KMS("connector %s on crtc %d: %s\n",
> > + DRM_DEBUG_KMS("connector %s on pipe %d [CRTC:%d]: %dx%d%s\n",
> > drm_get_connector_name(connector),
> > + pipe_name(to_intel_crtc(encoder->crtc)->pipe),
>
> pipe_name() gives you a char.
Using name was an afterthought. But other than, sane?
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] drm/i915: Use the connector name in fbdev debug messages
2014-05-13 12:59 ` Chris Wilson
@ 2014-05-13 13:02 ` Damien Lespiau
2014-05-13 13:26 ` Chris Wilson
0 siblings, 1 reply; 8+ messages in thread
From: Damien Lespiau @ 2014-05-13 13:02 UTC (permalink / raw)
To: Chris Wilson, intel-gfx
On Tue, May 13, 2014 at 01:59:16PM +0100, Chris Wilson wrote:
> On Tue, May 13, 2014 at 01:51:46PM +0100, Damien Lespiau wrote:
> > On Tue, May 13, 2014 at 01:45:09PM +0100, Chris Wilson wrote:
> > > - DRM_DEBUG_KMS("connector %s on crtc %d: %s\n",
> > > + DRM_DEBUG_KMS("connector %s on pipe %d [CRTC:%d]: %dx%d%s\n",
> > > drm_get_connector_name(connector),
> > > + pipe_name(to_intel_crtc(encoder->crtc)->pipe),
> >
> > pipe_name() gives you a char.
>
> Using name was an afterthought. But other than, sane?
Yes! With that fixed, definitely a
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
--
Damien
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] drm/i915: Use the connector name in fbdev debug messages
2014-05-13 13:02 ` Damien Lespiau
@ 2014-05-13 13:26 ` Chris Wilson
2014-05-13 14:02 ` Daniel Vetter
0 siblings, 1 reply; 8+ messages in thread
From: Chris Wilson @ 2014-05-13 13:26 UTC (permalink / raw)
To: intel-gfx
During initial probing of the modes to assign to the fbdev console, we
use the CRTC and connector ids. These are much harder for us to
understand than if we used their actual names (or pipe in the CRTC
case). Similarly, we want to manually print the mode size rather than
rely on mode->name being set.
v2: Use '%c' for pipe_name()
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
---
drivers/gpu/drm/i915/intel_fbdev.c | 28 ++++++++++++++++------------
1 file changed, 16 insertions(+), 12 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_fbdev.c b/drivers/gpu/drm/i915/intel_fbdev.c
index fbe7941f88c8..1d3f0a9cce31 100644
--- a/drivers/gpu/drm/i915/intel_fbdev.c
+++ b/drivers/gpu/drm/i915/intel_fbdev.c
@@ -344,14 +344,14 @@ static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper,
num_connectors_detected++;
if (!enabled[i]) {
- DRM_DEBUG_KMS("connector %d not enabled, skipping\n",
- connector->base.id);
+ DRM_DEBUG_KMS("connector %s not enabled, skipping\n",
+ drm_get_connector_name(connector));
continue;
}
if (connector->force == DRM_FORCE_OFF) {
- DRM_DEBUG_KMS("connector %d is disabled by user, skipping\n",
- connector->base.id);
+ DRM_DEBUG_KMS("connector %s is disabled by user, skipping\n",
+ drm_get_connector_name(connector));
enabled[i] = false;
continue;
}
@@ -361,8 +361,8 @@ static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper,
if (connector->force > DRM_FORCE_OFF)
goto bail;
- DRM_DEBUG_KMS("connector %d has no encoder or crtc, skipping\n",
- connector->base.id);
+ DRM_DEBUG_KMS("connector %s has no encoder or crtc, skipping\n",
+ drm_get_connector_name(connector));
enabled[i] = false;
continue;
}
@@ -383,16 +383,16 @@ static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper,
}
}
- DRM_DEBUG_KMS("looking for cmdline mode on connector %d\n",
- fb_conn->connector->base.id);
+ DRM_DEBUG_KMS("looking for cmdline mode on connector %s\n",
+ drm_get_connector_name(connector));
/* go for command line mode first */
modes[i] = drm_pick_cmdline_mode(fb_conn, width, height);
/* try for preferred next */
if (!modes[i]) {
- DRM_DEBUG_KMS("looking for preferred mode on connector %d\n",
- fb_conn->connector->base.id);
+ DRM_DEBUG_KMS("looking for preferred mode on connector %s\n",
+ drm_get_connector_name(connector));
modes[i] = drm_has_preferred_mode(fb_conn, width,
height);
}
@@ -410,16 +410,20 @@ static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper,
* since the fb helper layer wants a pointer to
* something we own.
*/
+ DRM_DEBUG_KMS("looking for current mode on connector %s\n",
+ drm_get_connector_name(connector));
intel_mode_from_pipe_config(&encoder->crtc->hwmode,
&to_intel_crtc(encoder->crtc)->config);
modes[i] = &encoder->crtc->hwmode;
}
crtcs[i] = new_crtc;
- DRM_DEBUG_KMS("connector %s on crtc %d: %s\n",
+ DRM_DEBUG_KMS("connector %s on pipe %c [CRTC:%d]: %dx%d%s\n",
drm_get_connector_name(connector),
+ pipe_name(to_intel_crtc(encoder->crtc)->pipe),
encoder->crtc->base.id,
- modes[i]->name);
+ modes[i]->hdisplay, modes[i]->vdisplay,
+ modes[i]->flags & DRM_MODE_FLAG_INTERLACE ? "i" :"");
fallback = false;
}
--
2.0.0.rc2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] drm/i915: Use the connector name in fbdev debug messages
2014-05-13 13:26 ` Chris Wilson
@ 2014-05-13 14:02 ` Daniel Vetter
2014-05-13 14:11 ` Chris Wilson
0 siblings, 1 reply; 8+ messages in thread
From: Daniel Vetter @ 2014-05-13 14:02 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
On Tue, May 13, 2014 at 02:26:39PM +0100, Chris Wilson wrote:
> During initial probing of the modes to assign to the fbdev console, we
> use the CRTC and connector ids. These are much harder for us to
> understand than if we used their actual names (or pipe in the CRTC
> case). Similarly, we want to manually print the mode size rather than
> rely on mode->name being set.
>
> v2: Use '%c' for pipe_name()
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
> ---
> drivers/gpu/drm/i915/intel_fbdev.c | 28 ++++++++++++++++------------
> 1 file changed, 16 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_fbdev.c b/drivers/gpu/drm/i915/intel_fbdev.c
> index fbe7941f88c8..1d3f0a9cce31 100644
> --- a/drivers/gpu/drm/i915/intel_fbdev.c
> +++ b/drivers/gpu/drm/i915/intel_fbdev.c
> @@ -344,14 +344,14 @@ static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper,
> num_connectors_detected++;
>
> if (!enabled[i]) {
> - DRM_DEBUG_KMS("connector %d not enabled, skipping\n",
> - connector->base.id);
> + DRM_DEBUG_KMS("connector %s not enabled, skipping\n",
> + drm_get_connector_name(connector));
> continue;
> }
>
> if (connector->force == DRM_FORCE_OFF) {
I seem to be lacking the patch to obey the connector->force stuff you have
here. Instead I have an early bail-out at the top of fb_initial_config.
Do I miss some crucial patch or can you please rebase on top of dinq?
Thanks, Daniel
> - DRM_DEBUG_KMS("connector %d is disabled by user, skipping\n",
> - connector->base.id);
> + DRM_DEBUG_KMS("connector %s is disabled by user, skipping\n",
> + drm_get_connector_name(connector));
> enabled[i] = false;
> continue;
> }
> @@ -361,8 +361,8 @@ static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper,
> if (connector->force > DRM_FORCE_OFF)
> goto bail;
>
> - DRM_DEBUG_KMS("connector %d has no encoder or crtc, skipping\n",
> - connector->base.id);
> + DRM_DEBUG_KMS("connector %s has no encoder or crtc, skipping\n",
> + drm_get_connector_name(connector));
> enabled[i] = false;
> continue;
> }
> @@ -383,16 +383,16 @@ static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper,
> }
> }
>
> - DRM_DEBUG_KMS("looking for cmdline mode on connector %d\n",
> - fb_conn->connector->base.id);
> + DRM_DEBUG_KMS("looking for cmdline mode on connector %s\n",
> + drm_get_connector_name(connector));
>
> /* go for command line mode first */
> modes[i] = drm_pick_cmdline_mode(fb_conn, width, height);
>
> /* try for preferred next */
> if (!modes[i]) {
> - DRM_DEBUG_KMS("looking for preferred mode on connector %d\n",
> - fb_conn->connector->base.id);
> + DRM_DEBUG_KMS("looking for preferred mode on connector %s\n",
> + drm_get_connector_name(connector));
> modes[i] = drm_has_preferred_mode(fb_conn, width,
> height);
> }
> @@ -410,16 +410,20 @@ static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper,
> * since the fb helper layer wants a pointer to
> * something we own.
> */
> + DRM_DEBUG_KMS("looking for current mode on connector %s\n",
> + drm_get_connector_name(connector));
> intel_mode_from_pipe_config(&encoder->crtc->hwmode,
> &to_intel_crtc(encoder->crtc)->config);
> modes[i] = &encoder->crtc->hwmode;
> }
> crtcs[i] = new_crtc;
>
> - DRM_DEBUG_KMS("connector %s on crtc %d: %s\n",
> + DRM_DEBUG_KMS("connector %s on pipe %c [CRTC:%d]: %dx%d%s\n",
> drm_get_connector_name(connector),
> + pipe_name(to_intel_crtc(encoder->crtc)->pipe),
> encoder->crtc->base.id,
> - modes[i]->name);
> + modes[i]->hdisplay, modes[i]->vdisplay,
> + modes[i]->flags & DRM_MODE_FLAG_INTERLACE ? "i" :"");
>
> fallback = false;
> }
> --
> 2.0.0.rc2
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] drm/i915: Use the connector name in fbdev debug messages
2014-05-13 14:02 ` Daniel Vetter
@ 2014-05-13 14:11 ` Chris Wilson
2014-05-14 10:07 ` Daniel Vetter
0 siblings, 1 reply; 8+ messages in thread
From: Chris Wilson @ 2014-05-13 14:11 UTC (permalink / raw)
To: Daniel Vetter; +Cc: intel-gfx
On Tue, May 13, 2014 at 04:02:40PM +0200, Daniel Vetter wrote:
> On Tue, May 13, 2014 at 02:26:39PM +0100, Chris Wilson wrote:
> > During initial probing of the modes to assign to the fbdev console, we
> > use the CRTC and connector ids. These are much harder for us to
> > understand than if we used their actual names (or pipe in the CRTC
> > case). Similarly, we want to manually print the mode size rather than
> > rely on mode->name being set.
> >
> > v2: Use '%c' for pipe_name()
> >
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
> > ---
> > drivers/gpu/drm/i915/intel_fbdev.c | 28 ++++++++++++++++------------
> > 1 file changed, 16 insertions(+), 12 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_fbdev.c b/drivers/gpu/drm/i915/intel_fbdev.c
> > index fbe7941f88c8..1d3f0a9cce31 100644
> > --- a/drivers/gpu/drm/i915/intel_fbdev.c
> > +++ b/drivers/gpu/drm/i915/intel_fbdev.c
> > @@ -344,14 +344,14 @@ static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper,
> > num_connectors_detected++;
> >
> > if (!enabled[i]) {
> > - DRM_DEBUG_KMS("connector %d not enabled, skipping\n",
> > - connector->base.id);
> > + DRM_DEBUG_KMS("connector %s not enabled, skipping\n",
> > + drm_get_connector_name(connector));
> > continue;
> > }
> >
> > if (connector->force == DRM_FORCE_OFF) {
>
> I seem to be lacking the patch to obey the connector->force stuff you have
> here. Instead I have an early bail-out at the top of fb_initial_config.
>
> Do I miss some crucial patch or can you please rebase on top of dinq?
It's not crucial, just a patch you missed to fix up some of Jesse's
shortcomings.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] drm/i915: Use the connector name in fbdev debug messages
2014-05-13 14:11 ` Chris Wilson
@ 2014-05-14 10:07 ` Daniel Vetter
0 siblings, 0 replies; 8+ messages in thread
From: Daniel Vetter @ 2014-05-14 10:07 UTC (permalink / raw)
To: Chris Wilson, Daniel Vetter, intel-gfx
On Tue, May 13, 2014 at 03:11:45PM +0100, Chris Wilson wrote:
> On Tue, May 13, 2014 at 04:02:40PM +0200, Daniel Vetter wrote:
> > On Tue, May 13, 2014 at 02:26:39PM +0100, Chris Wilson wrote:
> > > During initial probing of the modes to assign to the fbdev console, we
> > > use the CRTC and connector ids. These are much harder for us to
> > > understand than if we used their actual names (or pipe in the CRTC
> > > case). Similarly, we want to manually print the mode size rather than
> > > rely on mode->name being set.
> > >
> > > v2: Use '%c' for pipe_name()
> > >
> > > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > > Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
> > > ---
> > > drivers/gpu/drm/i915/intel_fbdev.c | 28 ++++++++++++++++------------
> > > 1 file changed, 16 insertions(+), 12 deletions(-)
> > >
> > > diff --git a/drivers/gpu/drm/i915/intel_fbdev.c b/drivers/gpu/drm/i915/intel_fbdev.c
> > > index fbe7941f88c8..1d3f0a9cce31 100644
> > > --- a/drivers/gpu/drm/i915/intel_fbdev.c
> > > +++ b/drivers/gpu/drm/i915/intel_fbdev.c
> > > @@ -344,14 +344,14 @@ static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper,
> > > num_connectors_detected++;
> > >
> > > if (!enabled[i]) {
> > > - DRM_DEBUG_KMS("connector %d not enabled, skipping\n",
> > > - connector->base.id);
> > > + DRM_DEBUG_KMS("connector %s not enabled, skipping\n",
> > > + drm_get_connector_name(connector));
> > > continue;
> > > }
> > >
> > > if (connector->force == DRM_FORCE_OFF) {
> >
> > I seem to be lacking the patch to obey the connector->force stuff you have
> > here. Instead I have an early bail-out at the top of fb_initial_config.
> >
> > Do I miss some crucial patch or can you please rebase on top of dinq?
>
> It's not crucial, just a patch you missed to fix up some of Jesse's
> shortcomings.
Hm, looked at that patch again and I guess that needs to be rebased to
take out the logic from Jesse's patch. So merged this one for now and
resolved the conflict.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2014-05-14 10:07 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-13 12:45 [PATCH] drm/i915: Use the connector name in fbdev debug messages Chris Wilson
2014-05-13 12:51 ` Damien Lespiau
2014-05-13 12:59 ` Chris Wilson
2014-05-13 13:02 ` Damien Lespiau
2014-05-13 13:26 ` Chris Wilson
2014-05-13 14:02 ` Daniel Vetter
2014-05-13 14:11 ` Chris Wilson
2014-05-14 10:07 ` Daniel Vetter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox