From: Andrew Morton <akpm@linux-foundation.org>
To: Jerome Glisse <jglisse@redhat.com>
Cc: airlied@gmail.com, dri-devel@lists.sf.net, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/radeon/kms: Fix oops when set_base is call with no FB
Date: Tue, 10 Nov 2009 14:30:56 -0800 [thread overview]
Message-ID: <20091110143056.defb1a82.akpm@linux-foundation.org> (raw)
In-Reply-To: <1257361399-5128-1-git-send-email-jglisse@redhat.com>
On Wed, 4 Nov 2009 20:03:19 +0100
Jerome Glisse <jglisse@redhat.com> wrote:
> Just do nothings crct_set_base i call with no FB.
>
hmpf. It's obvious that you spent hours carefully describing this
patch for us.
> diff --git a/drivers/gpu/drm/radeon/atombios_crtc.c b/drivers/gpu/drm/radeon/atombios_crtc.c
> index c15287a..f5987af 100644
> --- a/drivers/gpu/drm/radeon/atombios_crtc.c
> +++ b/drivers/gpu/drm/radeon/atombios_crtc.c
> @@ -578,8 +578,11 @@ int atombios_crtc_set_base(struct drm_crtc *crtc, int x, int y,
> uint64_t fb_location;
> uint32_t fb_format, fb_pitch_pixels, tiling_flags;
>
> - if (!crtc->fb)
> - return -EINVAL;
> + /* no fb bound */
> + if (!crtc->fb) {
> + DRM_DEBUG("No FB bound\n");
> + return 0;
> + }
>
> radeon_fb = to_radeon_framebuffer(crtc->fb);
>
> diff --git a/drivers/gpu/drm/radeon/radeon_legacy_crtc.c b/drivers/gpu/drm/radeon/radeon_legacy_crtc.c
> index 8d0b7aa..5794364 100644
> --- a/drivers/gpu/drm/radeon/radeon_legacy_crtc.c
> +++ b/drivers/gpu/drm/radeon/radeon_legacy_crtc.c
> @@ -408,6 +408,11 @@ int radeon_crtc_set_base(struct drm_crtc *crtc, int x, int y,
> uint32_t gen_cntl_reg, gen_cntl_val;
>
> DRM_DEBUG("\n");
> + /* no fb bound */
> + if (!crtc->fb) {
> + DRM_DEBUG("No FB bound\n");
> + return 0;
> + }
>
> radeon_fb = to_radeon_framebuffer(crtc->fb);
Under which circumstances does this oops occur? What userspace actions?
See, curious minds want to know whether this patch is needed in 2.6.33,
2.6.32, 2.6.31.x, 2.6.30,x, etc, etc. Often we rely upon the
originator to provide us with enough information to make that decision.
You didn't do this. Please always do so.
next prev parent reply other threads:[~2009-11-10 22:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-04 19:03 [PATCH] drm/radeon/kms: Fix oops when set_base is call with no FB Jerome Glisse
2009-11-10 22:30 ` Andrew Morton [this message]
2009-11-12 11:02 ` Jerome Glisse
2009-11-13 22:50 ` Andrew Morton
2009-11-19 20:48 ` James Simmons
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091110143056.defb1a82.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.sf.net \
--cc=jglisse@redhat.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox