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=-14.0 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 3EB58C07E96 for ; Thu, 8 Jul 2021 16:41:05 +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 DE35F6145A for ; Thu, 8 Jul 2021 16:41:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DE35F6145A 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 87D686E8EF; Thu, 8 Jul 2021 16:41:04 +0000 (UTC) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8C2516E8EF for ; Thu, 8 Jul 2021 16:41:03 +0000 (UTC) X-IronPort-AV: E=McAfee;i="6200,9189,10039"; a="209585320" X-IronPort-AV: E=Sophos;i="5.84,224,1620716400"; d="scan'208";a="209585320" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jul 2021 09:40:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,224,1620716400"; d="scan'208";a="428442675" Received: from irsmsx602.ger.corp.intel.com ([163.33.146.8]) by orsmga002.jf.intel.com with ESMTP; 08 Jul 2021 09:40:58 -0700 Received: from bgsmsx602.gar.corp.intel.com (10.109.78.81) by irsmsx602.ger.corp.intel.com (163.33.146.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4; Thu, 8 Jul 2021 17:40:56 +0100 Received: from bgsmsx602.gar.corp.intel.com ([10.109.78.81]) by BGSMSX602.gar.corp.intel.com ([10.109.78.81]) with mapi id 15.01.2242.008; Thu, 8 Jul 2021 22:10:55 +0530 From: "Kulkarni, Vandita" To: "Nikula, Jani" , "intel-gfx@lists.freedesktop.org" Thread-Topic: [v7 3/3] drm/i915/display/dsc: Force dsc BPP Thread-Index: AQHXc+OnPd36hWpFP0e5w8zWRrDuoqs4sPAAgAABLACAAF4qsP//1uaAgABg7JA= Date: Thu, 8 Jul 2021 16:40:54 +0000 Message-ID: <7fc13a3888694ba8a8f9dcf05d72fb18@intel.com> References: <20210708102549.27821-1-vandita.kulkarni@intel.com> <20210708102549.27821-4-vandita.kulkarni@intel.com> <87sg0p54w1.fsf@intel.com> <87mtqx54p1.fsf@intel.com> <87bl7c6agy.fsf@intel.com> In-Reply-To: <87bl7c6agy.fsf@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.5.1.3 x-originating-ip: [10.223.10.1] MIME-Version: 1.0 Subject: Re: [Intel-gfx] [v7 3/3] drm/i915/display/dsc: Force dsc BPP 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" > -----Original Message----- > From: Nikula, Jani > Sent: Thursday, July 8, 2021 9:53 PM > To: Kulkarni, Vandita ; intel- > gfx@lists.freedesktop.org > Subject: RE: [v7 3/3] drm/i915/display/dsc: Force dsc BPP > > On Thu, 08 Jul 2021, "Kulkarni, Vandita" wrote: > >> -----Original Message----- > >> From: Nikula, Jani > >> Sent: Thursday, July 8, 2021 6:44 PM > >> To: Kulkarni, Vandita ; intel- > >> gfx@lists.freedesktop.org > >> Cc: Kulkarni, Vandita > >> Subject: Re: [v7 3/3] drm/i915/display/dsc: Force dsc BPP > >> > >> On Thu, 08 Jul 2021, Jani Nikula wrote: > >> > On Thu, 08 Jul 2021, Vandita Kulkarni > wrote: > >> >> Set DSC BPP to the value forced through debugfs. It can go from > >> >> bpc to bpp-1. > >> >> > >> >> Signed-off-by: Vandita Kulkarni > >> >> --- > >> >> drivers/gpu/drm/i915/display/intel_dp.c | 17 +++++++++++++++++ > >> >> 1 file changed, 17 insertions(+) > >> >> > >> >> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c > >> >> b/drivers/gpu/drm/i915/display/intel_dp.c > >> >> index 5b52beaddada..3e50cdd7e448 100644 > >> >> --- a/drivers/gpu/drm/i915/display/intel_dp.c > >> >> +++ b/drivers/gpu/drm/i915/display/intel_dp.c > >> >> @@ -1240,6 +1240,23 @@ static int > >> >> intel_dp_dsc_compute_config(struct > >> intel_dp *intel_dp, > >> >> pipe_config->port_clock = intel_dp->common_rates[limits- > >> >max_clock]; > >> >> pipe_config->lane_count = limits->max_lane_count; > >> >> > >> >> + if (intel_dp->force_dsc_en) { > >> > >> Oh, this should check for intel_dp->force_dsc_bpp. We don't want to > >> always force the bpp when we force dsc enable. > > Okay will fix this. > > And I was returning -EINVAL , to fail the test on setting invalid BPP. > > Okay, if it makes the test easier, I guess it's fine. Up to you. Okay, for now I have sent a patch like you suggested, as I see that there are no negative test cases . Have sent the v2 of this patch. So, it wouldn't make much difference. Thanks, Vandita > > BR, > Jani. > > > > >> > >> >> + /* As of today we support DSC for only RGB */ > >> >> + if (intel_dp->force_dsc_bpp >= 8 && > >> >> + intel_dp->force_dsc_bpp < pipe_bpp) { > >> >> + drm_dbg_kms(&dev_priv->drm, > >> >> + "DSC BPP forced to %d", > >> >> + intel_dp->force_dsc_bpp); > >> >> + pipe_config->dsc.compressed_bpp = > >> >> + intel_dp->force_dsc_bpp; > >> >> + } else { > >> >> + drm_dbg_kms(&dev_priv->drm, > >> >> + "Invalid DSC BPP %d", > >> >> + intel_dp->force_dsc_bpp); > >> >> + return -EINVAL; > >> > > >> > I'd just let it use the normal compressed_bpp, with the debug > >> > message, instead of returning -EINVAL. > >> > > >> >> + } > >> >> + } > >> >> + > >> > > >> > This should be *after* the below blocks, because otherwise > >> > compressed_bpp will be overridden by the normal case, not by the > >> > force case! > >> > > >> > BR, > >> > Jani. > >> > > >> >> if (intel_dp_is_edp(intel_dp)) { > >> >> pipe_config->dsc.compressed_bpp = > >> >> min_t(u16, > >> drm_edp_dsc_sink_output_bpp(intel_dp->dsc_dpcd) >> 4, > >> > >> -- > >> Jani Nikula, Intel Open Source Graphics Center > > -- > Jani Nikula, Intel Open Source Graphics Center _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx