Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1443650

Re: [PATCH] drm/i915: Fix legacy gamma lut updates in Linux 4.7-rc6

Path csiph.com!1.us.feeder.erje.net!feeder.erje.net!2.eu.feeder.erje.net!news2.arglkargh.de!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod
From Mario Kleiner <mario.kleiner.de@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH] drm/i915: Fix legacy gamma lut updates in Linux 4.7-rc6
Date Thu, 14 Jul 2016 20:00:03 +0200
Message-ID <rUT5x-4jD-29@gated-at.bofh.it> (permalink)
References <rU3gB-3DR-11@gated-at.bofh.it> <rU3zY-3Mz-9@gated-at.bofh.it>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=tYMuyEUlCFBbI9fCGcq1/y5IYSygIG1cuPlrdNp3KlI=; b=Hd5J1mXIMOZAcO0TRbJWQesqsMUXxsUF+2cWiGvdhkfiAW6Y7Ai57Mtm3k5qSN/vNp DZxptyz7PsGeOycgra8ZOSeCRBveYxYgHQOZJhGao2q5nCIItgUU81ZcG3EXKtuIkI0q MpvLswU/gQLVeS3sGn2QmJVuDssK3JTgj9sIBUeiE1IHOJLQOPCnRWBGFrwKNyduQ7P3 7NilfdSIJmlT1XYsMToPkBJihYXhaLN5LLXtQGip6XEmhnzvgLmoMNzpVutyaF32At88 Ykc67deZNKodbv7OOkhZ0EYKeib4yQvXlG2Er5Uttn3Ub2MmWs6zhcYMm0q23pE/8GFC /W2Q==
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=tYMuyEUlCFBbI9fCGcq1/y5IYSygIG1cuPlrdNp3KlI=; b=dpIxmqi2r87KZxC5ujcZ9MVwNuZfU6RE6fe3e01G+4+poBC0jY8kuHCqO3WYXJinSR A2DsxZWXhQOKqoT8jl39Xha6E/BMigOyCsOKrUzkSjLqPyMKpebCYHUnpWysHISdl+zR 6cxPZ7A9/Jd7xDWUKyEiu8SK5XVv4SD4dZZhJaRKyt2AOs45rFfYYeyVRljMuRnqx1pp r+OCrOgMpVfxTT3n0GJ7LaAgirI4jrGccjM+S4khRnhtTj6g7JC/EdmKJbopQv7iScSN eC8wPgZCxXxeW6+CiNxLfaAOif6qNNFoXeMAlTmEs1XVmbw4xqBtuVjnVJH1vj/a5bA6 sZRA==
X-Gm-Message-State ALyK8tL8ZO0lnmxIkywOxDLKKCgm4GZtFcMFGD6TDKJWVMgM2zJnV5ghKAKMoAXy6h7TUA==
X-Received by 10.28.203.137 with SMTP id b131mr2333574wmg.78.1468518737870; Thu, 14 Jul 2016 10:52:17 -0700 (PDT)
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0
MIME-Version 1.0
Content-Type text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding 7bit
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 110
Organization linux.* mail to news gateway
X-Original-Cc intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, Maarten Lankhorst <maarten.lankhorst@linux.intel.com>, Daniel Vetter <daniel.vetter@ffwll.ch>, Jani Nikula <jani.nikula@linux.intel.com>, Mario Kleiner <mario.kleiner.de@gmail.com>
X-Original-Date Thu, 14 Jul 2016 19:52:15 +0200
X-Original-Message-ID <5787D14F.30005@gmail.com>
X-Original-References <1468319586-8509-1-git-send-email-mario.kleiner.de@gmail.com> <15be51a4-74e2-2390-5a18-2172a7eae8ce@intel.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1443650

Show key headers only | View raw


Ok, so legacy gamma table updates are completely broken for Intel on 
Linux-4.7-rc7, the final release candidate.

The good news is that applying Lionel's patch

"drm/i915: add missing condition for committing planes on crtc"

from

https://patchwork.freedesktop.org/patch/89111/

fixes it nicely. The patch currently applies cleanly to drm-fixes and 
drm-next and is

Reviewed-and-tested-by: Mario Kleiner <mario.kleiner.de@gmail.com>


When we are at it, could somebody please look at that updated series of 
my Displayport color depth fixes ("EDID/DP fixes for proper bpc 
detection of displays.") i sent out a week ago?

Especially pulling patch 2/5 "[PATCH 2/5] drm/i915/dp: Revert 
"drm/i915/dp: fall back to 18 bpp when sink capability is unknown" would 
be important, as that bug introduced a regression for Intel + DP + 
legacy DP converters into stable kernels which is very serious for users 
of scientific/medical display equipment, especially as the failures can 
easily go unnoticed during normal equipment tests, but would introduce 
the equivalent of "silent data corruption" into their measured 
scientific data, which is not a great experience given that collecting 
such data can easily take half a year of work time and ten-thousands of 
euros of wasted research funding.

Patches 3 and 4 contain changes Daniel asked me to do, patch 5 would be 
good to safe-guard against similar issues in the future.

thanks,
-mario

On 07/12/2016 12:50 PM, Lionel Landwerlin wrote:
> Hi Mario,
>
> There was a couple of patch to fix this issue :
>
> https://patchwork.freedesktop.org/series/5467/
> https://patchwork.freedesktop.org/series/5466/
>
> I tested this late last week on drm-intel-nightly, it seems a series of
> revert fixed most of the issues.
>
> Cheers,
>
> -
> Lionel
>
> On 12/07/16 11:33, Mario Kleiner wrote:
>> Updating legacy gamma tables, e.g., via RandR doesn't work at all
>> as of Linux 4.7-rc6.
>>
>> Reason seems to be that the required call to
>> drm_atomic_helper_commit_planes_on_crtc is skipped in
>> intel_atomic_commit after userspace set new gamma tables,
>> because neither crtc->state->planes_changed nor
>> update_pipe (= pipe_config->update_pipe) are true.
>>
>> Removing the check for planes_changed || update_pipe fixes
>> gamma table updates.
>>
>> The code for Linux 4.8 drm-next has changed a lot in that area
>> wrt. 4.7, but the new code for 4.8 also removed those checks
>> and calls drm_atomic_helper_commit_planes_on_crtc unconditionally,
>> and legacy gamma lut updates work on drm-next, so this seems to be
>> the right solution.
>>
>> Tested also shutdown/reboot, suspend/resume, (un-)plugging displays,
>> mode switches for resolution/refresh rate, display rotation, and
>> page-flipping/pageflip timing on Intel HD Ironlake to confirm the
>> fix apparently doesn't break anything under X11.
>>
>> Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
>> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
>> Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
>> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
>> ---
>>   drivers/gpu/drm/i915/intel_display.c | 4 +---
>>   1 file changed, 1 insertion(+), 3 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_display.c
>> b/drivers/gpu/drm/i915/intel_display.c
>> index 04452cf..eb8fb36 100644
>> --- a/drivers/gpu/drm/i915/intel_display.c
>> +++ b/drivers/gpu/drm/i915/intel_display.c
>> @@ -13685,7 +13685,6 @@ static int intel_atomic_commit(struct
>> drm_device *dev,
>>           bool modeset = needs_modeset(crtc->state);
>>           struct intel_crtc_state *pipe_config =
>>               to_intel_crtc_state(crtc->state);
>> -        bool update_pipe = !modeset && pipe_config->update_pipe;
>>           if (modeset && crtc->state->active) {
>>               update_scanline_offset(to_intel_crtc(crtc));
>> @@ -13699,8 +13698,7 @@ static int intel_atomic_commit(struct
>> drm_device *dev,
>>               drm_atomic_get_existing_plane_state(state, crtc->primary))
>>               intel_fbc_enable(intel_crtc);
>> -        if (crtc->state->active &&
>> -            (crtc->state->planes_changed || update_pipe))
>> +        if (crtc->state->active)
>>               drm_atomic_helper_commit_planes_on_crtc(old_crtc_state);
>>           if (pipe_config->base.active && needs_vblank_wait(pipe_config))
>
>

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

[PATCH] drm/i915: Fix legacy gamma lut updates in Linux 4.7-rc6 Mario Kleiner <mario.kleiner.de@gmail.com> - 2016-07-12 12:40 +0200
  Re: [PATCH] drm/i915: Fix legacy gamma lut updates in Linux 4.7-rc6 Lionel Landwerlin <lionel.g.landwerlin@intel.com> - 2016-07-12 13:00 +0200
    Re: [PATCH] drm/i915: Fix legacy gamma lut updates in Linux 4.7-rc6 Mario Kleiner <mario.kleiner.de@gmail.com> - 2016-07-12 14:20 +0200
      Re: [PATCH] drm/i915: Fix legacy gamma lut updates in Linux 4.7-rc6 Lionel Landwerlin <lionel.g.landwerlin@intel.com> - 2016-07-12 17:10 +0200
        Re: [PATCH] drm/i915: Fix legacy gamma lut updates in Linux 4.7-rc6 Mario Kleiner <mario.kleiner.de@gmail.com> - 2016-07-12 18:00 +0200
    Re: [PATCH] drm/i915: Fix legacy gamma lut updates in Linux 4.7-rc6 Mario Kleiner <mario.kleiner.de@gmail.com> - 2016-07-14 20:00 +0200

csiph-web