devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: Maxime Ripard <maxime@cerno.tech>
Cc: Eric Anholt <eric@anholt.net>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Daniel Vetter <daniel.vetter@intel.com>,
	David Airlie <airlied@linux.ie>,
	Mark Rutland <mark.rutland@arm.com>,
	Rob Herring <robh+dt@kernel.org>,
	Frank Rowand <frowand.list@gmail.com>,
	Hoegeun Kwon <hoegeun.kwon@samsung.com>,
	Dave Stevenson <dave.stevenson@raspberrypi.com>,
	Phil Elwell <phil@raspberrypi.com>,
	linux-rpi-kernel@lists.infradead.org,
	Tim Gover <tim.gover@raspberrypi.com>,
	bcm-kernel-feedback-list@broadcom.com,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v3 7/7] drm/vc4: kms: Don't disable the muxing of an active CRTC
Date: Thu, 19 Nov 2020 17:08:21 +0100	[thread overview]
Message-ID: <ad921dad-461a-65c4-e255-bc7e182cd982@suse.de> (raw)
In-Reply-To: <20201119143213.wqgvn2d3vphyeked@gilmour.lan>


[-- Attachment #1.1.1: Type: text/plain, Size: 2206 bytes --]

Hi

Am 19.11.20 um 15:32 schrieb Maxime Ripard:
> On Thu, Nov 19, 2020 at 10:12:43AM +0100, Thomas Zimmermann wrote:
>> Hi
>>
>> Am 05.11.20 um 14:56 schrieb Maxime Ripard:
>>> The current HVS muxing code will consider the CRTCs in a given state to
>>> setup their muxing in the HVS, and disable the other CRTCs muxes.
>>>
>>> However, it's valid to only update a single CRTC with a state, and in this
>>> situation we would mux out a CRTC that was enabled but left untouched by
>>> the new state.
>>>
>>> Fix this by setting a flag on the CRTC state when the muxing has been
>>> changed, and only change the muxing configuration when that flag is there.
>>>
>>> Fixes: 87ebcd42fb7b ("drm/vc4: crtc: Assign output to channel automatically")
>>> Reviewed-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
>>> Tested-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
>>> Signed-off-by: Maxime Ripard <maxime@cerno.tech>
>>> ---
>>>    drivers/gpu/drm/vc4/vc4_drv.h |  1 +
>>>    drivers/gpu/drm/vc4/vc4_kms.c | 82 ++++++++++++++++++++---------------
>>>    2 files changed, 48 insertions(+), 35 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/vc4/vc4_drv.h b/drivers/gpu/drm/vc4/vc4_drv.h
>>> index 014113823647..325b53ff11b3 100644
>>> --- a/drivers/gpu/drm/vc4/vc4_drv.h
>>> +++ b/drivers/gpu/drm/vc4/vc4_drv.h
>>> @@ -524,6 +524,7 @@ struct vc4_crtc_state {
>>>    	struct drm_mm_node mm;
>>>    	bool feed_txp;
>>>    	bool txp_armed;
>>> +	bool needs_muxing;
>>
>> Maybe rather 'update_muxing'.
>>
>> More generally, I'd separate fields that contain actual CRTC state, such
>> assigned_channel, from those that only contain transitional state during
>> update-commit, such as needs_muxing.
> 
> How would you separate them?
> 
> I'll use your other suggestions, thanks!

I'd put the transitional state at the end of the struct and put a 
comment above. Something like 'Transitional state below; only valid 
during atomic commits'.

Best regards
Thomas

> Maxime
> 

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer

[-- Attachment #1.1.2: OpenPGP_0x680DC11D530B7A23.asc --]
[-- Type: application/pgp-keys, Size: 7535 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

      reply	other threads:[~2020-11-19 16:08 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-05 13:56 [PATCH v3 0/7] drm/vc4: Rework the HVS muxing code Maxime Ripard
2020-11-05 13:56 ` [PATCH v3 1/7] drm/vc4: kms: Switch to drmm_add_action_or_reset Maxime Ripard
2020-11-19  7:56   ` Thomas Zimmermann
2020-11-05 13:56 ` [PATCH v3 2/7] drm/vc4: kms: Remove useless define Maxime Ripard
2020-11-19  7:57   ` Thomas Zimmermann
2020-11-05 13:56 ` [PATCH v3 3/7] drm/vc4: kms: Rename NUM_CHANNELS Maxime Ripard
2020-11-19  7:56   ` Thomas Zimmermann
2020-11-05 13:56 ` [PATCH v3 4/7] drm/vc4: kms: Split the HVS muxing check in a separate function Maxime Ripard
2020-11-19  8:04   ` Thomas Zimmermann
2020-11-05 13:56 ` [PATCH v3 5/7] drm/vc4: kms: Document the muxing corner cases Maxime Ripard
2020-11-19  8:11   ` Thomas Zimmermann
2020-11-19 13:53     ` Maxime Ripard
2020-11-05 13:56 ` [PATCH v3 6/7] drm/vc4: kms: Store the unassigned channel list in the state Maxime Ripard
2020-11-19  8:59   ` Thomas Zimmermann
2020-11-19 14:08     ` Maxime Ripard
2020-11-20 14:02     ` Maxime Ripard
2020-11-05 13:56 ` [PATCH v3 7/7] drm/vc4: kms: Don't disable the muxing of an active CRTC Maxime Ripard
2020-11-19  9:12   ` Thomas Zimmermann
2020-11-19 14:32     ` Maxime Ripard
2020-11-19 16:08       ` Thomas Zimmermann [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=ad921dad-461a-65c4-e255-bc7e182cd982@suse.de \
    --to=tzimmermann@suse.de \
    --cc=airlied@linux.ie \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=daniel.vetter@intel.com \
    --cc=dave.stevenson@raspberrypi.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=eric@anholt.net \
    --cc=frowand.list@gmail.com \
    --cc=hoegeun.kwon@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mark.rutland@arm.com \
    --cc=maxime@cerno.tech \
    --cc=phil@raspberrypi.com \
    --cc=robh+dt@kernel.org \
    --cc=tim.gover@raspberrypi.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).