Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp902995pxk; Mon, 31 Aug 2020 04:41:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzsVsg9Mx1w62+byliiTf2ZImLzUrV6W3Dv/EFaLPHthKkq8fs4EwtdNOa/BG8iEXut75Um X-Received: by 2002:a17:906:5418:: with SMTP id q24mr715335ejo.296.1598874076543; Mon, 31 Aug 2020 04:41:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598874076; cv=none; d=google.com; s=arc-20160816; b=EA0wt0SupFP2RSq9HNjmMaMvB1L+Cima8DO5Jyn36H6kAUaumLN7wHI419tU7rSDq5 P/8RwuTtKyAdZe7LnsyUegzSZ5qoQnx81EzBXcrA9i56B2s/XJEdflTJByYn5Dojylfv kd8Zg/CiwAJaxZZp5Rm/yikTRVtza6/RibG6dCYaUdxCV4WbEVfAaMjOuYUYYfx1twjK 2S4F1+rF/MI/hGGX60muxGbOW8SNbZYZv1bAoWT7GCIdvz8L1FT86KU7oq2o9+2tRZ1B r8GQgYA+WW9x2WlqMNnO63SHexALYKpSFidtRYkiJDd43F19YLQmiSQFXXpnBIWcJuV3 UJGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:reply-to:cc:from:to :dkim-signature:date; bh=jR//Y3Z0pAZURnrw2Jxzg9pdJ+m1iQvesaUWWeCTY4M=; b=CRP7TiFVo/vfEmLFp+8AC5/hTYNoDS1pDQRS6hK8SS6N3RrljWX6TmzCKkZadXqTW+ PRYpu8l8ZiO7tAueSTr2KG+5zw1nRbxjMRJM/+3arj8jHbpoedhkL3FQeAzOzpIHyXPD ySvI+jllowg+2uXWc6LvLCWxLei4C55qyh/VoMfmDfGeTppVjvu23+NNLnao4vtJFGdH t68OaVD2jRLux1VOcWUgu2FzSmJv+TiDnboK0svxJSwj3Q4Mm5SfeLohmuUPMS4It40Y uSNkRKCnfksni9SC0QfFyQa2iUxCc5nmn+iiDOo+L25VG7ahieV3Ioof2dhFRYf6hmyP ismQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@emersion.fr header.s=protonmail2 header.b=UekIRHPT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=emersion.fr Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b5si5406232eju.541.2020.08.31.04.40.51; Mon, 31 Aug 2020 04:41:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@emersion.fr header.s=protonmail2 header.b=UekIRHPT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=emersion.fr Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726326AbgHaLj0 (ORCPT + 99 others); Mon, 31 Aug 2020 07:39:26 -0400 Received: from mail-40136.protonmail.ch ([185.70.40.136]:10950 "EHLO mail-40136.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726106AbgHaLjX (ORCPT ); Mon, 31 Aug 2020 07:39:23 -0400 Date: Mon, 31 Aug 2020 11:39:10 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emersion.fr; s=protonmail2; t=1598873960; bh=jR//Y3Z0pAZURnrw2Jxzg9pdJ+m1iQvesaUWWeCTY4M=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=UekIRHPTa/7jem9cbDC/HwBO8KucEskeXTb8yABX7QRhpmLiBllgeR+x+Lq7qOf5j R3Bc3S8aYch9rVGo83pGsmkNsjAOMJ+ouhp3wIFsbSWcEZJYc2t86TiJ07Mn/j33hh SLYuzIA7RFb+A93gtgrsro+5j/cAQQlmA4Dm74N9FH8LKdBATinc3mzeZyGfoko1ez 7+CmpeuErep4xDhYxia/KzwvkihDpR6czC+SRLz4qkmPSZREQkPEdrTWhfU0kQXZal +H1Qku2xN4EG32ZnM1A/vKTPIM4LKKeLN+Eq8jwTbqZ8wp4du01d09Y1IYVuVN63jo QZD4z5LerLmNA== To: Sidong Yang From: Simon Ser Cc: Daniel Vetter , Rodrigo Siqueira , Haneen Mohammed , Emil Velikov , "linux-kernel@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , Melissa Wen Reply-To: Simon Ser Subject: Re: [PATCH] drm/vkms: add support for gamma_set interface Message-ID: In-Reply-To: <20200829140647.7626-1-realwakka@gmail.com> References: <20200829140647.7626-1-realwakka@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Saturday, August 29, 2020 4:06 PM, Sidong Yang wro= te: > Currently vkms module doesn't support gamma function for userspace. so ig= t > subtests in kms_plane(pixel-format-pipe-A-plan) failed for calling > drmModeCrtcSetGamma(). It doesn't seem like this IGT test's goal is to exercise support for gamma LUTs. Does the test just tries to reset the gamma LUT to linear? If so, I think the IGT test should be fixed to ignore "I don't support gamma" errors. > This patch set gamma_set interface in vkms_crtc_funcs for > support gamma function. With initializing crtc, added calls for setting g= amma > size. it pass the test after this patch. > > Cc: Daniel Vetter > Cc: Rodrigo Siqueira > Cc: Haneen Mohammed > > Signed-off-by: Sidong Yang > --- > drivers/gpu/drm/vkms/vkms_crtc.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/drivers/gpu/drm/vkms/vkms_crtc.c b/drivers/gpu/drm/vkms/vkms= _crtc.c > index ac85e17428f8..643435fb2ee6 100644 > --- a/drivers/gpu/drm/vkms/vkms_crtc.c > +++ b/drivers/gpu/drm/vkms/vkms_crtc.c > @@ -160,6 +160,7 @@ static const struct drm_crtc_funcs vkms_crtc_funcs = =3D { > =09.get_crc_sources=09=3D vkms_get_crc_sources, > =09.set_crc_source=09=09=3D vkms_set_crc_source, > =09.verify_crc_source=09=3D vkms_verify_crc_source, > +=09.gamma_set=09=09=3D drm_atomic_helper_legacy_gamma_set, Why does VKMS need to use a legacy helper? It seems like this patch just advertises support for gamma LUTs, but ignores any value set by user-space. If VKMS advertises support for gamma LUTs, it needs to take the LUT into account when blending planes. > }; > > static int vkms_crtc_atomic_check(struct drm_crtc *crtc, > @@ -275,6 +276,13 @@ int vkms_crtc_init(struct drm_device *dev, struct dr= m_crtc *crtc, > =09=09return ret; > =09} > > +=09ret =3D drm_mode_crtc_set_gamma_size(crtc, 256); > +=09if (ret) { > +=09=09DRM_ERROR("Failed to set gamma size\n"); > +=09=09return ret; > +=09} > +=09drm_crtc_enable_color_mgmt(crtc, 0, false, 256); > + > =09drm_crtc_helper_add(crtc, &vkms_crtc_helper_funcs); > > =09spin_lock_init(&vkms_out->lock); > -- > 2.17.1