From: Daniel Vetter <daniel@ffwll.ch>
To: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: release cursor when crtc is destroyed
Date: Wed, 29 May 2013 14:16:15 +0200 [thread overview]
Message-ID: <20130529121615.GK15743@phenom.ffwll.local> (raw)
In-Reply-To: <1366727228-6207-1-git-send-email-mika.kuoppala@intel.com>
On Tue, Apr 23, 2013 at 05:27:08PM +0300, Mika Kuoppala wrote:
> crtc is holding a reference to a cursor bo and it needs
> to be released when crtc is destroyed so that we don't leak
> the cursor bo.
>
> v2: Enhance set and move cursor so that disabled
> cursor is handled correctly (Ville Syrjälä)
>
> Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
I've wondered a bit whether we shouldn't shove the last part into
crtc_off, but that would constitute a bit an api change. Queued for -next,
thanks for the patch.
-Daniel
> ---
> drivers/gpu/drm/i915/intel_display.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 74156e2..f5cdd91 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -6554,7 +6554,7 @@ static int intel_crtc_cursor_set(struct drm_crtc *crtc,
> intel_crtc->cursor_width = width;
> intel_crtc->cursor_height = height;
>
> - intel_crtc_update_cursor(crtc, true);
> + intel_crtc_update_cursor(crtc, intel_crtc->cursor_bo != NULL);
>
> return 0;
> fail_unpin:
> @@ -6573,7 +6573,7 @@ static int intel_crtc_cursor_move(struct drm_crtc *crtc, int x, int y)
> intel_crtc->cursor_x = x;
> intel_crtc->cursor_y = y;
>
> - intel_crtc_update_cursor(crtc, true);
> + intel_crtc_update_cursor(crtc, intel_crtc->cursor_bo != NULL);
>
> return 0;
> }
> @@ -7087,6 +7087,8 @@ static void intel_crtc_destroy(struct drm_crtc *crtc)
> kfree(work);
> }
>
> + intel_crtc_cursor_set(crtc, NULL, 0, 0, 0);
> +
> drm_crtc_cleanup(crtc);
>
> kfree(intel_crtc);
> --
> 1.7.9.5
>
> _______________________________________________
> 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
prev parent reply other threads:[~2013-05-29 12:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-23 14:27 [PATCH] drm/i915: release cursor when crtc is destroyed Mika Kuoppala
2013-04-23 14:56 ` Daniel Vetter
2013-04-23 14:58 ` Chris Wilson
2013-04-23 16:10 ` Daniel Vetter
2013-05-29 12:16 ` Daniel Vetter [this message]
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=20130529121615.GK15743@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=intel-gfx@lists.freedesktop.org \
--cc=mika.kuoppala@linux.intel.com \
/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 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.