* [PATCH] drm/i915: sprite init failure on pre-SNB is not a failure
@ 2012-01-12 16:08 Jesse Barnes
2012-01-12 16:54 ` Daniel Vetter
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Jesse Barnes @ 2012-01-12 16:08 UTC (permalink / raw)
To: airlied, intel-gfx
[-- Attachment #1.1: Type: text/plain, Size: 1915 bytes --]
We can call the plane init function unconditionally, but don't need to
complain if it fails, since that will only happen if we're out of
memory (and other things will fail) or if we're on the wrong platform
(which is ok).
And remove the DRM_ERRORs from the sprite code itself to avoid dmesg
spam.
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 29743de..e3bfa50 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -9027,12 +9027,9 @@ void intel_modeset_init(struct drm_device *dev)
for (i = 0; i < dev_priv->num_pipe; i++) {
intel_crtc_init(dev, i);
- if (HAS_PCH_SPLIT(dev)) {
- ret = intel_plane_init(dev, i);
- if (ret)
- DRM_ERROR("plane %d init failed: %d\n",
- i, ret);
- }
+ ret = intel_plane_init(dev, i);
+ if (ret)
+ DRM_DEBUG_KMS("plane %d init failed: %d\n", i, ret);
}
/* Just disable it once at startup */
diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
index b26e7c4..32909e3 100644
--- a/drivers/gpu/drm/i915/intel_sprite.c
+++ b/drivers/gpu/drm/i915/intel_sprite.c
@@ -466,10 +466,8 @@ intel_update_plane(struct drm_plane *plane, struct drm_crtc *crtc,
mutex_lock(&dev->struct_mutex);
ret = intel_pin_and_fence_fb_obj(dev, obj, NULL);
- if (ret) {
- DRM_ERROR("failed to pin object\n");
+ if (ret)
goto out_unlock;
- }
intel_plane->obj = obj;
@@ -632,10 +630,8 @@ intel_plane_init(struct drm_device *dev, enum pipe pipe)
unsigned long possible_crtcs;
int ret;
- if (!(IS_GEN6(dev) || IS_GEN7(dev))) {
- DRM_ERROR("new plane code only for SNB+\n");
+ if (!(IS_GEN6(dev) || IS_GEN7(dev)))
return -ENODEV;
- }
intel_plane = kzalloc(sizeof(struct intel_plane), GFP_KERNEL);
if (!intel_plane)
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH] drm/i915: sprite init failure on pre-SNB is not a failure
2012-01-12 16:08 [PATCH] drm/i915: sprite init failure on pre-SNB is not a failure Jesse Barnes
@ 2012-01-12 16:54 ` Daniel Vetter
2012-01-12 16:59 ` Jesse Barnes
2012-01-12 17:03 ` Keith Packard
2012-01-13 23:50 ` Keith Packard
2 siblings, 1 reply; 10+ messages in thread
From: Daniel Vetter @ 2012-01-12 16:54 UTC (permalink / raw)
To: Jesse Barnes; +Cc: airlied, intel-gfx
On Thu, Jan 12, 2012 at 17:08, Jesse Barnes <jbarnes@virtuousgeek.org> wrote:
> We can call the plane init function unconditionally, but don't need to
> complain if it fails, since that will only happen if we're out of
> memory (and other things will fail) or if we're on the wrong platform
> (which is ok).
>
> And remove the DRM_ERRORs from the sprite code itself to avoid dmesg
> spam.
>
> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 29743de..e3bfa50 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -9027,12 +9027,9 @@ void intel_modeset_init(struct drm_device *dev)
>
> for (i = 0; i < dev_priv->num_pipe; i++) {
> intel_crtc_init(dev, i);
> - if (HAS_PCH_SPLIT(dev)) {
> - ret = intel_plane_init(dev, i);
> - if (ret)
> - DRM_ERROR("plane %d init failed: %d\n",
> - i, ret);
> - }
> + ret = intel_plane_init(dev, i);
> + if (ret)
> + DRM_DEBUG_KMS("plane %d init failed: %d\n", i, ret);
> }
>
> /* Just disable it once at startup */
> diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
> index b26e7c4..32909e3 100644
> --- a/drivers/gpu/drm/i915/intel_sprite.c
> +++ b/drivers/gpu/drm/i915/intel_sprite.c
> @@ -466,10 +466,8 @@ intel_update_plane(struct drm_plane *plane, struct drm_crtc *crtc,
> mutex_lock(&dev->struct_mutex);
>
> ret = intel_pin_and_fence_fb_obj(dev, obj, NULL);
> - if (ret) {
> - DRM_ERROR("failed to pin object\n");
> + if (ret)
> goto out_unlock;
> - }
>
> intel_plane->obj = obj;
>
> @@ -632,10 +630,8 @@ intel_plane_init(struct drm_device *dev, enum pipe pipe)
> unsigned long possible_crtcs;
> int ret;
>
> - if (!(IS_GEN6(dev) || IS_GEN7(dev))) {
> - DRM_ERROR("new plane code only for SNB+\n");
> + if (!(IS_GEN6(dev) || IS_GEN7(dev)))
> return -ENODEV;
> - }
Why not return 0; to avoid the "plane init" spam at kms debug level?
After all, nothing failed, there's just no plane there to init ...
-Daniel
--
Daniel Vetter
daniel.vetter@ffwll.ch - +41 (0) 79 364 57 48 - http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] drm/i915: sprite init failure on pre-SNB is not a failure
2012-01-12 16:54 ` Daniel Vetter
@ 2012-01-12 16:59 ` Jesse Barnes
2012-01-13 16:10 ` Keith Packard
0 siblings, 1 reply; 10+ messages in thread
From: Jesse Barnes @ 2012-01-12 16:59 UTC (permalink / raw)
To: Daniel Vetter; +Cc: airlied, intel-gfx
[-- Attachment #1.1: Type: text/plain, Size: 2805 bytes --]
On Thu, 12 Jan 2012 17:54:50 +0100
Daniel Vetter <daniel@ffwll.ch> wrote:
> On Thu, Jan 12, 2012 at 17:08, Jesse Barnes <jbarnes@virtuousgeek.org> wrote:
> > We can call the plane init function unconditionally, but don't need to
> > complain if it fails, since that will only happen if we're out of
> > memory (and other things will fail) or if we're on the wrong platform
> > (which is ok).
> >
> > And remove the DRM_ERRORs from the sprite code itself to avoid dmesg
> > spam.
> >
> > Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
> >
> > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> > index 29743de..e3bfa50 100644
> > --- a/drivers/gpu/drm/i915/intel_display.c
> > +++ b/drivers/gpu/drm/i915/intel_display.c
> > @@ -9027,12 +9027,9 @@ void intel_modeset_init(struct drm_device *dev)
> >
> > for (i = 0; i < dev_priv->num_pipe; i++) {
> > intel_crtc_init(dev, i);
> > - if (HAS_PCH_SPLIT(dev)) {
> > - ret = intel_plane_init(dev, i);
> > - if (ret)
> > - DRM_ERROR("plane %d init failed: %d\n",
> > - i, ret);
> > - }
> > + ret = intel_plane_init(dev, i);
> > + if (ret)
> > + DRM_DEBUG_KMS("plane %d init failed: %d\n", i, ret);
> > }
> >
> > /* Just disable it once at startup */
> > diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
> > index b26e7c4..32909e3 100644
> > --- a/drivers/gpu/drm/i915/intel_sprite.c
> > +++ b/drivers/gpu/drm/i915/intel_sprite.c
> > @@ -466,10 +466,8 @@ intel_update_plane(struct drm_plane *plane, struct drm_crtc *crtc,
> > mutex_lock(&dev->struct_mutex);
> >
> > ret = intel_pin_and_fence_fb_obj(dev, obj, NULL);
> > - if (ret) {
> > - DRM_ERROR("failed to pin object\n");
> > + if (ret)
> > goto out_unlock;
> > - }
> >
> > intel_plane->obj = obj;
> >
> > @@ -632,10 +630,8 @@ intel_plane_init(struct drm_device *dev, enum pipe pipe)
> > unsigned long possible_crtcs;
> > int ret;
> >
> > - if (!(IS_GEN6(dev) || IS_GEN7(dev))) {
> > - DRM_ERROR("new plane code only for SNB+\n");
> > + if (!(IS_GEN6(dev) || IS_GEN7(dev)))
> > return -ENODEV;
> > - }
>
> Why not return 0; to avoid the "plane init" spam at kms debug level?
> After all, nothing failed, there's just no plane there to init ...
ENODEV actually does tell you why the init failed, in case you want to
look at the debug logs...
--
Jesse Barnes, Intel Open Source Technology Center
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] drm/i915: sprite init failure on pre-SNB is not a failure
2012-01-12 16:08 [PATCH] drm/i915: sprite init failure on pre-SNB is not a failure Jesse Barnes
2012-01-12 16:54 ` Daniel Vetter
@ 2012-01-12 17:03 ` Keith Packard
2012-01-13 23:50 ` Keith Packard
2 siblings, 0 replies; 10+ messages in thread
From: Keith Packard @ 2012-01-12 17:03 UTC (permalink / raw)
To: Jesse Barnes, airlied, intel-gfx
[-- Attachment #1.1: Type: text/plain, Size: 142 bytes --]
> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
--
keith.packard@intel.com
[-- Attachment #1.2: Type: application/pgp-signature, Size: 827 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] drm/i915: sprite init failure on pre-SNB is not a failure
2012-01-12 16:59 ` Jesse Barnes
@ 2012-01-13 16:10 ` Keith Packard
2012-01-13 22:55 ` Daniel Vetter
0 siblings, 1 reply; 10+ messages in thread
From: Keith Packard @ 2012-01-13 16:10 UTC (permalink / raw)
To: Jesse Barnes, Daniel Vetter; +Cc: airlied, intel-gfx
[-- Attachment #1.1: Type: text/plain, Size: 291 bytes --]
On Thu, 12 Jan 2012 08:59:37 -0800, Jesse Barnes <jbarnes@virtuousgeek.org> wrote:
> ENODEV actually does tell you why the init failed, in case you want to
> look at the debug logs...
Daniel -- are you OK with merging this as-is? It seems fine to me.
--
keith.packard@intel.com
[-- Attachment #1.2: Type: application/pgp-signature, Size: 827 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] drm/i915: sprite init failure on pre-SNB is not a failure
2012-01-13 16:10 ` Keith Packard
@ 2012-01-13 22:55 ` Daniel Vetter
0 siblings, 0 replies; 10+ messages in thread
From: Daniel Vetter @ 2012-01-13 22:55 UTC (permalink / raw)
To: Keith Packard; +Cc: airlied, intel-gfx
On Fri, Jan 13, 2012 at 08:10:42AM -0800, Keith Packard wrote:
> On Thu, 12 Jan 2012 08:59:37 -0800, Jesse Barnes <jbarnes@virtuousgeek.org> wrote:
>
> > ENODEV actually does tell you why the init failed, in case you want to
> > look at the debug logs...
>
> Daniel -- are you OK with merging this as-is? It seems fine to me.
That was just a bit of random bikeshedding and we won't see it anyway as
opposed to the overly load DRM_ERROR, i.e. I'm fine as-is.
-Daniel
--
Daniel Vetter
Mail: daniel@ffwll.ch
Mobile: +41 (0)79 365 57 48
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] drm/i915: sprite init failure on pre-SNB is not a failure
2012-01-12 16:08 [PATCH] drm/i915: sprite init failure on pre-SNB is not a failure Jesse Barnes
2012-01-12 16:54 ` Daniel Vetter
2012-01-12 17:03 ` Keith Packard
@ 2012-01-13 23:50 ` Keith Packard
2012-01-14 0:56 ` Jesse Barnes
2012-01-14 1:05 ` Jesse Barnes
2 siblings, 2 replies; 10+ messages in thread
From: Keith Packard @ 2012-01-13 23:50 UTC (permalink / raw)
To: Jesse Barnes, airlied, intel-gfx
[-- Attachment #1.1: Type: text/plain, Size: 476 bytes --]
On Thu, 12 Jan 2012 08:08:44 -0800, Jesse Barnes <jbarnes@virtuousgeek.org> wrote:
> We can call the plane init function unconditionally, but don't need to
> complain if it fails, since that will only happen if we're out of
> memory (and other things will fail) or if we're on the wrong platform
> (which is ok).
Can you please fix your mailer to stop sending patches in quotable
printed form? git-am doesn't seem to like it at all...
--
keith.packard@intel.com
[-- Attachment #1.2: Type: application/pgp-signature, Size: 827 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] drm/i915: sprite init failure on pre-SNB is not a failure
2012-01-13 23:50 ` Keith Packard
@ 2012-01-14 0:56 ` Jesse Barnes
2012-01-14 1:05 ` Jesse Barnes
1 sibling, 0 replies; 10+ messages in thread
From: Jesse Barnes @ 2012-01-14 0:56 UTC (permalink / raw)
To: Keith Packard; +Cc: airlied, intel-gfx
On Fri, 13 Jan 2012 15:50:14 -0800
Keith Packard <keithp@keithp.com> wrote:
> On Thu, 12 Jan 2012 08:08:44 -0800, Jesse Barnes <jbarnes@virtuousgeek.org> wrote:
> > We can call the plane init function unconditionally, but don't need to
> > complain if it fails, since that will only happen if we're out of
> > memory (and other things will fail) or if we're on the wrong platform
> > (which is ok).
>
> Can you please fix your mailer to stop sending patches in quotable
> printed form? git-am doesn't seem to like it at all...
Hm wtf... /me tries. Yeah how did that happen. /me fixes claws config.
--
Jesse Barnes, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] drm/i915: sprite init failure on pre-SNB is not a failure
2012-01-13 23:50 ` Keith Packard
2012-01-14 0:56 ` Jesse Barnes
@ 2012-01-14 1:05 ` Jesse Barnes
2012-01-14 6:25 ` Keith Packard
1 sibling, 1 reply; 10+ messages in thread
From: Jesse Barnes @ 2012-01-14 1:05 UTC (permalink / raw)
To: Keith Packard; +Cc: intel-gfx
On Fri, 13 Jan 2012 15:50:14 -0800
Keith Packard <keithp@keithp.com> wrote:
> On Thu, 12 Jan 2012 08:08:44 -0800, Jesse Barnes <jbarnes@virtuousgeek.org> wrote:
> > We can call the plane init function unconditionally, but don't need to
> > complain if it fails, since that will only happen if we're out of
> > memory (and other things will fail) or if we're on the wrong platform
> > (which is ok).
>
> Can you please fix your mailer to stop sending patches in quotable
> printed form? git-am doesn't seem to like it at all...
Looks like signing the message the way I did caused it to be packaged
differently. Then I also had word wrap fail on the inserted file when
I sent it to myself as plaintext. Lame. I'll be more careful in
future.
--
Jesse Barnes, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] drm/i915: sprite init failure on pre-SNB is not a failure
2012-01-14 1:05 ` Jesse Barnes
@ 2012-01-14 6:25 ` Keith Packard
0 siblings, 0 replies; 10+ messages in thread
From: Keith Packard @ 2012-01-14 6:25 UTC (permalink / raw)
To: Jesse Barnes; +Cc: intel-gfx
[-- Attachment #1.1: Type: text/plain, Size: 487 bytes --]
On Fri, 13 Jan 2012 17:05:04 -0800, Jesse Barnes <jbarnes@virtuousgeek.org> wrote:
> Looks like signing the message the way I did caused it to be packaged
> differently. Then I also had word wrap fail on the inserted file when
> I sent it to myself as plaintext. Lame. I'll be more careful in
> future.
I managed to pull it apart with 'munpack' and apply it by hand, 'cause
someone told me to be tolerant and helpful when accepting patches.
--
keith.packard@intel.com
[-- Attachment #1.2: Type: application/pgp-signature, Size: 827 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2012-01-14 6:25 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-12 16:08 [PATCH] drm/i915: sprite init failure on pre-SNB is not a failure Jesse Barnes
2012-01-12 16:54 ` Daniel Vetter
2012-01-12 16:59 ` Jesse Barnes
2012-01-13 16:10 ` Keith Packard
2012-01-13 22:55 ` Daniel Vetter
2012-01-12 17:03 ` Keith Packard
2012-01-13 23:50 ` Keith Packard
2012-01-14 0:56 ` Jesse Barnes
2012-01-14 1:05 ` Jesse Barnes
2012-01-14 6:25 ` Keith Packard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox