From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Ezequiel Garcia <ezequiel@collabora.com>
Cc: dri-devel@lists.freedesktop.org,
Mark Rutland <mark.rutland@arm.com>,
devicetree@vger.kernel.org, Jacopo Mondi <jacopo@jmondi.org>,
linux-kernel@vger.kernel.org, Rob Herring <robh+dt@kernel.org>,
Douglas Anderson <dianders@chromium.org>,
linux-rockchip@lists.infradead.org,
Boris Brezillon <boris.brezillon@collabora.com>,
Sean Paul <seanpaul@chromium.org>,
kernel@collabora.com
Subject: Re: [PATCH v3 5/5] RFC: drm/atomic-helper: Reapply color transformation after resume
Date: Tue, 1 Oct 2019 17:55:56 +0300 [thread overview]
Message-ID: <20191001145556.GP1208@intel.com> (raw)
In-Reply-To: <20190930222802.32088-6-ezequiel@collabora.com>
On Mon, Sep 30, 2019 at 07:28:02PM -0300, Ezequiel Garcia wrote:
> Some platforms are not able to maintain the color transformation
> state after a system suspend/resume cycle.
>
> Set the colog_mgmt_changed flag so that CMM on the CRTCs in
> the suspend state are reapplied after system resume.
>
> Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
> ---
> This is an RFC, and it's mostly based on Jacopo Mondi's work https://lkml.org/lkml/2019/9/6/498.
>
> Changes from v2:
> * New patch.
> ---
> drivers/gpu/drm/drm_atomic_helper.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
> index e41db0f202ca..518488125575 100644
> --- a/drivers/gpu/drm/drm_atomic_helper.c
> +++ b/drivers/gpu/drm/drm_atomic_helper.c
> @@ -3234,8 +3234,20 @@ int drm_atomic_helper_resume(struct drm_device *dev,
> struct drm_atomic_state *state)
> {
> struct drm_modeset_acquire_ctx ctx;
> + struct drm_crtc_state *crtc_state;
> + struct drm_crtc *crtc;
> + unsigned int i;
> int err;
>
> + for_each_new_crtc_in_state(state, crtc, crtc_state, i) {
> + /*
> + * Force re-enablement of CMM after system resume if any
> + * of the DRM color transformation properties was set in
> + * the state saved at system suspend time.
> + */
> + if (crtc_state->gamma_lut)
You say "any" but you check the one?
> + crtc_state->color_mgmt_changed = true;
But I'm not convinced this is the best way to go about it.
I would generally expect that you repgrogram everything
when doing a full modeset since the state was possibly
lost while the crtc was disabled.
> + }
> drm_mode_config_reset(dev);
>
> DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, 0, err);
> --
> 2.22.0
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Ville Syrjälä
Intel
prev parent reply other threads:[~2019-10-01 14:55 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-30 22:27 [PATCH v3 0/5] RK3288 Gamma LUT Ezequiel Garcia
2019-09-30 22:27 ` [PATCH v3 1/5] Revert "drm/rockchip: Use drm_atomic_helper_commit_tail_rpm" Ezequiel Garcia
2019-09-30 22:27 ` [PATCH v3 2/5] dt-bindings: display: rockchip: document VOP gamma LUT address Ezequiel Garcia
2019-09-30 22:28 ` [PATCH v3 3/5] drm/rockchip: Add optional support for CRTC gamma LUT Ezequiel Garcia
2019-10-07 18:54 ` Sean Paul
2019-10-08 19:23 ` Ezequiel Garcia
2019-10-08 19:33 ` Ezequiel Garcia
2019-10-08 20:03 ` Sean Paul
2019-10-08 21:55 ` Ezequiel Garcia
2019-09-30 22:28 ` [PATCH v3 4/5] ARM: dts: rockchip: Add RK3288 VOP gamma LUT address Ezequiel Garcia
2019-09-30 22:28 ` [PATCH v3 5/5] RFC: drm/atomic-helper: Reapply color transformation after resume Ezequiel Garcia
2019-10-01 14:52 ` Jacopo Mondi
2019-10-01 14:55 ` Ville Syrjälä [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=20191001145556.GP1208@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=boris.brezillon@collabora.com \
--cc=devicetree@vger.kernel.org \
--cc=dianders@chromium.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=ezequiel@collabora.com \
--cc=jacopo@jmondi.org \
--cc=kernel@collabora.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=mark.rutland@arm.com \
--cc=robh+dt@kernel.org \
--cc=seanpaul@chromium.org \
/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).