From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.1 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 773D9C433DB for ; Thu, 24 Dec 2020 06:05:10 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3AFA522AAC for ; Thu, 24 Dec 2020 06:05:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3AFA522AAC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BBFDE897BB; Thu, 24 Dec 2020 06:05:09 +0000 (UTC) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by gabe.freedesktop.org (Postfix) with ESMTPS id C3A66897BB for ; Thu, 24 Dec 2020 06:05:08 +0000 (UTC) IronPort-SDR: /+bgHrNpj3SYfAroH9+hxYQBkgsw8J3sP9ihbE0/Ci4HMSEyC30tGJS/sCRnUBjzgzk1PN2YiR xL3lVZDV55kw== X-IronPort-AV: E=McAfee;i="6000,8403,9844"; a="240198340" X-IronPort-AV: E=Sophos;i="5.78,444,1599548400"; d="scan'208";a="240198340" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Dec 2020 22:05:07 -0800 IronPort-SDR: pbVZsuIyMuGRpStuinM1fNozWQWhfMvcZocackA6m92JQ9ZKLgatdAoCLVO0J7hYV1kPB5NqwG /ngV/WjHsyUg== X-IronPort-AV: E=Sophos;i="5.78,444,1599548400"; d="scan'208";a="458291373" Received: from nesarwar-mobl1.amr.corp.intel.com (HELO [10.213.126.121]) ([10.213.126.121]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Dec 2020 22:05:02 -0800 To: Jani Nikula , Chris Wilson , intel-gfx@lists.freedesktop.org References: <20201223103917.14687-1-chris@chris-wilson.co.uk> <87a6u4okvl.fsf@intel.com> From: "Nautiyal, Ankit K" Message-ID: Date: Thu, 24 Dec 2020 11:34:59 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.5.1 MIME-Version: 1.0 In-Reply-To: <87a6u4okvl.fsf@intel.com> Content-Language: en-US Subject: Re: [Intel-gfx] [PATCH] drm/i915/display: Bitwise or the conversion colour specifier together X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Thanks Chris to catch this. This definitely should be bitwise Operator, as mentioned by Jani is right thing to do. The PCON which I had access to, had the F/W which was using 303Ch (previously proposed) for color conversion capability, instead of what is latest mentioned in the spec ie. 83h. While testing, I had to skip this line of code, and hardcoded to older register ie. 303Ch. I Will get this patch tested and update. Thanks & Regards, Ankit On 12/23/2020 4:21 PM, Jani Nikula wrote: > On Wed, 23 Dec 2020, Chris Wilson wrote: >> drivers/gpu/drm/i915/display/intel_dp.c:6922 intel_dp_update_420() warn: should this be a bitwise op? >> drivers/gpu/drm/i915/display/intel_dp.c:6922 intel_dp_update_420() warn: should this be a bitwise op? >> drivers/gpu/drm/i915/display/intel_dp.c:6923 intel_dp_update_420() warn: should this be a bitwise op? >> >> Inside drm_dp_downstream_rgb_to_ycbcr_conversion(), that paramter >> 'color_spc' is used as return port_cap[3] & color_spc, implying that it >> is indeed a mask and not a boolean value. > So this one belongs in topic/dp-hdmi-2.1-pcon branch. > > Purely based on the context this is the right thing to do, so: > > Reviewed-by: Jani Nikula > > Ankit, please test the patch in case it uncovers some other > issues. It'll impact the RGB to YCbCr conversion. > > BR, > Jani. > > >> Fixes: 522508b665df ("drm/i915/display: Let PCON convert from RGB to YCbCr if it can") >> Signed-off-by: Chris Wilson >> Cc: Uma Shankar >> Cc: Ankit Nautiyal >> Cc: Jani Nikula >> --- >> drivers/gpu/drm/i915/display/intel_dp.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c >> index 8b4b2ea52859..157a850a83a7 100644 >> --- a/drivers/gpu/drm/i915/display/intel_dp.c >> +++ b/drivers/gpu/drm/i915/display/intel_dp.c >> @@ -6918,8 +6918,8 @@ intel_dp_update_420(struct intel_dp *intel_dp) >> intel_dp->downstream_ports); >> rgb_to_ycbcr = drm_dp_downstream_rgb_to_ycbcr_conversion(intel_dp->dpcd, >> intel_dp->downstream_ports, >> - DP_DS_HDMI_BT601_RGB_YCBCR_CONV || >> - DP_DS_HDMI_BT709_RGB_YCBCR_CONV || >> + DP_DS_HDMI_BT601_RGB_YCBCR_CONV | >> + DP_DS_HDMI_BT709_RGB_YCBCR_CONV | >> DP_DS_HDMI_BT2020_RGB_YCBCR_CONV); >> >> if (INTEL_GEN(i915) >= 11) { _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx