All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 3/8] drm/i915: Unconditionally clear plane visibility, v2.
Date: Fri, 21 Sep 2018 18:20:37 +0200	[thread overview]
Message-ID: <4507af80-4c2b-924e-24b1-8180189f2414@linux.intel.com> (raw)
In-Reply-To: <20180921161559.GE5565@intel.com>

Op 21-09-18 om 18:15 schreef Ville Syrjälä:
> On Fri, Sep 21, 2018 at 06:00:27PM +0200, Maarten Lankhorst wrote:
>> Op 21-09-18 om 17:26 schreef Ville Syrjälä:
>>> On Thu, Sep 20, 2018 at 12:27:06PM +0200, Maarten Lankhorst wrote:
>>>> We need to assume the plane has been visible before, even if no CRTC
>>>> is assigned to the plane. This is because nv12 will enable a a extra
>>>> plane and make it visible by marking it in crtc_state->active_planes
>>>> for intel_update_planes_on_crtc().
>>>>
>>>> Additionally, clear visible flag in intel_plane_atomic_check, in case
>>>> we ever hit a bug with visibility. Our code implicitly assumes that
>>>> plane_state->visible is only true when crtc and fb are set,
>>>> so we will either null deref in intel_fbc_choose_crtc() or
>>>> do something bad during the actual commit which cares even more.
>>>>
>>>> Changes since v1:
>>>> - Unconditionally clear crtc_state->active_planes as well.
>>>> - Reword commit message, since this is now a preparation patch for
>>>>   NV12 Y / UV plane linking.
>>>>
>>>> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
>>>> ---
>>>>  drivers/gpu/drm/i915/intel_atomic_plane.c | 8 +++++---
>>>>  1 file changed, 5 insertions(+), 3 deletions(-)
>>>>
>>>> diff --git a/drivers/gpu/drm/i915/intel_atomic_plane.c b/drivers/gpu/drm/i915/intel_atomic_plane.c
>>>> index aabebe0d2e9b..f70e9cb9cf02 100644
>>>> --- a/drivers/gpu/drm/i915/intel_atomic_plane.c
>>>> +++ b/drivers/gpu/drm/i915/intel_atomic_plane.c
>>>> @@ -117,10 +117,13 @@ int intel_plane_atomic_check_with_state(const struct intel_crtc_state *old_crtc_
>>>>  	struct intel_plane *intel_plane = to_intel_plane(plane);
>>>>  	int ret;
>>>>  
>>>> +	crtc_state->active_planes &= ~BIT(intel_plane->id);
>>> nv12_planes too?
>> No, we don't have to. We don't set nv12_planes on the Y plane. :)
>> In all other cases we clear it correctly.
> I think sticking to single approach would be less confusing nonetheless.
>
Agreed, will fix it up when pushing this patch.

Can I add your r-b on it then?

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

  reply	other threads:[~2018-09-21 16:20 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-20 10:27 [PATCH 0/8] drm/i915: Preparations for adding gen11 planar formats Maarten Lankhorst
2018-09-20 10:27 ` [PATCH 1/8] drm/i915: Clean up casts to crtc_state in intel_atomic_commit_tail() Maarten Lankhorst
2018-09-20 10:27 ` [PATCH 2/8] drm/i915: Handle cursor updating active_planes correctly, v2 Maarten Lankhorst
2018-09-20 23:18   ` Matt Roper
2018-09-21  9:41     ` Maarten Lankhorst
2018-09-20 10:27 ` [PATCH 3/8] drm/i915: Unconditionally clear plane visibility, v2 Maarten Lankhorst
2018-09-20 23:18   ` Matt Roper
2018-09-21 15:26   ` Ville Syrjälä
2018-09-21 16:00     ` Maarten Lankhorst
2018-09-21 16:15       ` Ville Syrjälä
2018-09-21 16:20         ` Maarten Lankhorst [this message]
2018-09-21 16:24           ` Ville Syrjälä
2018-09-20 10:27 ` [PATCH 4/8] drm/i915: Make intel_crtc_disable_planes() use active planes mask Maarten Lankhorst
2018-09-20 10:27 ` [PATCH 5/8] drm/i915: Replace call to commit_planes_on_crtc with internal update, v2 Maarten Lankhorst
2018-09-20 10:27 ` [PATCH 6/8] drm/i915: Clean up scaler setup Maarten Lankhorst
2018-09-20 23:19   ` Matt Roper
2018-09-21 14:44     ` [PATCH] drm/i915: Clean up scaler setup, v2 Maarten Lankhorst
2018-09-21 16:40       ` Matt Roper
2018-09-21 17:32         ` Maarten Lankhorst
2018-09-20 10:27 ` [PATCH 7/8] drm/i915: Move programming plane scaler to its own function Maarten Lankhorst
2018-09-20 23:19   ` Matt Roper
2018-09-21 15:29   ` Ville Syrjälä
2018-09-20 10:27 ` [PATCH 8/8] drm/i915: Force planar YUV coordinates to be a multiple of 2, v2 Maarten Lankhorst
2018-09-20 23:19   ` Matt Roper
2018-09-20 10:49 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Preparations for adding gen11 planar formats Patchwork
2018-09-20 10:52 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-09-20 11:14 ` ✓ Fi.CI.BAT: success " Patchwork
2018-09-20 12:10 ` ✗ Fi.CI.IGT: failure " Patchwork
2018-09-21 15:00 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Preparations for adding gen11 planar formats. (rev2) Patchwork
2018-09-21 15:03 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-09-21 15:21 ` ✓ Fi.CI.BAT: success " Patchwork
2018-09-21 16:23 ` ✓ Fi.CI.IGT: " Patchwork

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=4507af80-4c2b-924e-24b1-8180189f2414@linux.intel.com \
    --to=maarten.lankhorst@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=ville.syrjala@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.