From patchwork Fri Apr 8 17:17:51 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lionel Landwerlin X-Patchwork-Id: 8785071 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A89799F36E for ; Fri, 8 Apr 2016 17:18:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D5865202FF for ; Fri, 8 Apr 2016 17:18:03 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 6C7CB202EB for ; Fri, 8 Apr 2016 17:18:02 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B51406EAB0; Fri, 8 Apr 2016 17:18:00 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTP id 1BAEB6EAB0; Fri, 8 Apr 2016 17:18:00 +0000 (UTC) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP; 08 Apr 2016 10:17:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,454,1455004800"; d="scan'208";a="951019110" Received: from dpeterse-mobl2.ger.corp.intel.com (HELO ivy.ger.corp.intel.com) ([10.252.34.57]) by orsmga002.jf.intel.com with ESMTP; 08 Apr 2016 10:17:58 -0700 From: Lionel Landwerlin To: intel-gfx@lists.freedesktop.org Subject: [PATCH] drm: atomic: fix legacy gamma set helper Date: Fri, 8 Apr 2016 18:17:51 +0100 Message-Id: <1460135871-23307-1-git-send-email-lionel.g.landwerlin@intel.com> X-Mailer: git-send-email 2.8.0.rc3 Cc: dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Color management properties are a bit of an odd use case because they're not marked as atomic properties. Currently we're not updating the non atomic values so the drm_crtc_state is out of sync with the values stored in the crtc object. Cc: Maarten Lankhorst Cc: Bob Paauwe Cc: Signed-off-by: Lionel Landwerlin --- drivers/gpu/drm/drm_atomic_helper.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c index 7bf678e..4aacd44 100644 --- a/drivers/gpu/drm/drm_atomic_helper.c +++ b/drivers/gpu/drm/drm_atomic_helper.c @@ -2964,16 +2964,22 @@ retry: config->degamma_lut_property, 0); if (ret) goto fail; + drm_object_property_set_value(&crtc->base, + config->degamma_lut_property, 0); ret = drm_atomic_crtc_set_property(crtc, crtc_state, config->ctm_property, 0); if (ret) goto fail; + drm_object_property_set_value(&crtc->base, + config->ctm_property, 0); ret = drm_atomic_crtc_set_property(crtc, crtc_state, config->gamma_lut_property, blob->base.id); if (ret) goto fail; + drm_object_property_set_value(&crtc->base, + config->gamma_lut_property, blob->base.id); ret = drm_atomic_commit(state); if (ret)