All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michel Dänzer" <michel@daenzer.net>
To: Grigori Goronzy <greg@chown.ath.cx>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 4/4] drm/radeon: unpin cursor BOs before suspend
Date: Fri, 3 Jul 2015 19:01:39 +0900	[thread overview]
Message-ID: <55965D83.6080208@daenzer.net> (raw)
In-Reply-To: <9206b2097dd73ce87d138a82c353990d@chown.ath.cx>

On 03.07.2015 17:16, Grigori Goronzy wrote:
> On 2015-07-03 05:30, Michel Dänzer wrote:
>>
>> On resume, the cursor BO is currently pinned again by
>> radeon_cursor_reset -> radeon_set_cursor. However, radeon_cursor_reset
>> is also called when changing the video mode, in which case it causes the
>> cursor BO pin count to increase by 1 for each CRTC using it. Presumably,
>> the mouse cursor would end up broken again on suspend/resume after that
>> for you.
>>
> 
> Indeed. It seems to be problematic overall that radeon_cursor_reset does
> unconditionally increment the pin count. As soon as a mode is switched
> with cursor enabled, the cursor BO will stay pinned forever.

Exactly, so we can't ignore that for this fix.


>> We need a solution which pins the BO again on resume but doesn't
>> increase the pin count during a mode change. I'm not sure right now what
>> the best way is to achieve that, I'll think about it more later.
> 
> How about this:
> 
> Never let radeon_set_cursor mess with the pin count, do that in
> radeon_crtc_cursor_set2 only, and make sure that the reference^Wpin
> count is updated accordingly (i.e. exactly one pin per crtc). Then add
> some explicit cursor resume code that traverses the crtc list and
> re-pins as needed. Maybe that that nice, but should work.

Sounds good. I probably won't get around to playing with this before
next week, feel free to give it a try in the meantime.


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2015-07-03 10:01 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-02 23:54 [PATCH 1/4] drm/radeon: use RCU query for GEM_BUSY syscall Grigori Goronzy
2015-07-02 23:54 ` [PATCH 2/4] drm/radeon: fix HDP flushing Grigori Goronzy
2015-07-02 23:54   ` Grigori Goronzy
2015-07-02 23:54 ` [PATCH 3/4] drm/radeon: default to 2048 MB GART size on SI+ Grigori Goronzy
2015-07-02 23:54 ` [PATCH 4/4] drm/radeon: unpin cursor BOs before suspend Grigori Goronzy
2015-07-02 23:54   ` Grigori Goronzy
2015-07-03  3:30   ` Michel Dänzer
2015-07-03  8:16     ` Grigori Goronzy
2015-07-03 10:01       ` Michel Dänzer [this message]
2015-07-03  9:45 ` [PATCH 1/4] drm/radeon: use RCU query for GEM_BUSY syscall Christian König
2015-07-06 21:14   ` Alex Deucher

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=55965D83.6080208@daenzer.net \
    --to=michel@daenzer.net \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=greg@chown.ath.cx \
    /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.