dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: Tomeu Vizoso <tomeu@tomeuvizoso.net>
Cc: Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH] drm/crc: Only open CRC on atomic drivers when the CRTC is active.
Date: Mon, 10 Jul 2017 09:57:01 +0200	[thread overview]
Message-ID: <ef8b0ec7-8f45-7263-97c5-24bbdc5af168@linux.intel.com> (raw)
In-Reply-To: <20170707110144.qn3ex7b25unzyzkf@phenom.ffwll.local>

Op 07-07-17 om 13:01 schreef Daniel Vetter:
> On Thu, Jul 06, 2017 at 03:03:15PM +0200, Maarten Lankhorst wrote:
>> Op 06-07-17 om 13:09 schreef Tomeu Vizoso:
>>> Looks good to me:
>>>
>>> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
>>>
>>> I guess you have tested this with IGT? In any case, I think it would
>>> be good to mention how a patch has been tested in the changelog. That
>>> can be very useful to others if things go wrong at some point.
>> Testcase: debugfs_test.read_all_entries
>>
>> But I hit it by doing a recursive grep, which I guess is the same thing here. :)
>>
>> One further improvement I wanted to do was reject opening the CRC with -EIO
>> when the crtc is not active, that way the above test will not hang.
>> Does the below patch also look good to you?
>>
>> ----8<-----
>> Commit e8fa5671183c ("drm: crc: Wait for a frame before returning
>> from open()") adds a wait for CRC frame, but with the CRTC off
>> this will never be generated. For atomic drivers we know if a CRTC
>> is active through crtc_state->active, so when inactive reject the
>> open with -EIO.
>>
>> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
>> Fixes: e8fa5671183c ("drm: crc: Wait for a frame before returning from open()")
>> Testcase: debugfs_test.read_all_entries
> At least for the semantics I think this makes sense. Opening the CRC file
> when the crtc is off is undefined.
>
> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
>
> But pls get Tomeu's ack too.
Tomeu, can you ack? :)

I did some testing on IGT with both patches applied on all tests with
CRC in their name, no problems with opening CRC as far as I can see,
and all tests except kms_ccs and kms_mmap_write_crc succeed. The
former needs render compression, the latter fails on a crc failure,
so it can't have been caused by this patch.

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

      reply	other threads:[~2017-07-10  7:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-21 11:00 [PATCH] drm/crc: Handle opening and closing crc better Maarten Lankhorst
2017-07-06 11:09 ` Tomeu Vizoso
2017-07-06 13:03   ` [PATCH] drm/crc: Only open CRC on atomic drivers when the CRTC is active Maarten Lankhorst
2017-07-07 11:01     ` [Intel-gfx] " Daniel Vetter
2017-07-10  7:57       ` Maarten Lankhorst [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=ef8b0ec7-8f45-7263-97c5-24bbdc5af168@linux.intel.com \
    --to=maarten.lankhorst@linux.intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=tomeu@tomeuvizoso.net \
    /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