linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jacopo Mondi <jacopo@jmondi.org>
To: Ezequiel Garcia <ezequiel@collabora.com>
Cc: dri-devel@lists.freedesktop.org,
	linux-rockchip@lists.infradead.org,
	"Heiko Stübner" <heiko@sntech.de>,
	"Sandy Huang" <hjc@rock-chips.com>,
	kernel@collabora.com, "Sean Paul" <seanpaul@chromium.org>,
	"Boris Brezillon" <boris.brezillon@collabora.com>,
	"Douglas Anderson" <dianders@chromium.org>,
	"Ilia Mirkin" <imirkin@alum.mit.edu>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Mark Rutland" <mark.rutland@arm.com>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 5/5] RFC: drm/atomic-helper: Reapply color transformation after resume
Date: Tue, 1 Oct 2019 16:52:22 +0200	[thread overview]
Message-ID: <20191001145222.32aapomoqlaxpvbb@uno.localdomain> (raw)
In-Reply-To: <20190930222802.32088-6-ezequiel@collabora.com>

[-- Attachment #1: Type: text/plain, Size: 1856 bytes --]

Hi Ezequiel,

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

CMM is the name of the Renesas unit for color enanchement. It should
not be used here as this will apply to all platforms.

> 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)

Please note that in my original patch I only took gamma_lut into
account as that's what our CMM supports at the moment, but you should
here consider the degamma_lut and cmt flags in the crtc_state.

> +			crtc_state->color_mgmt_changed = true;
> +	}
>  	drm_mode_config_reset(dev);
>
>  	DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, 0, err);
> --
> 2.22.0
>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2019-10-01 14:50 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 [this message]
2019-10-01 14:55   ` Ville Syrjälä

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=20191001145222.32aapomoqlaxpvbb@uno.localdomain \
    --to=jacopo@jmondi.org \
    --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=heiko@sntech.de \
    --cc=hjc@rock-chips.com \
    --cc=imirkin@alum.mit.edu \
    --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).