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=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no 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 C76A5C41604 for ; Tue, 6 Oct 2020 10:00:03 +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 3B50F20674 for ; Tue, 6 Oct 2020 10:00:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3B50F20674 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.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 7C35C89CC4; Tue, 6 Oct 2020 10:00:02 +0000 (UTC) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8C29D89CC4 for ; Tue, 6 Oct 2020 10:00:01 +0000 (UTC) IronPort-SDR: ZTOUYlCc5KsAcLGSWwxfaj22WJmQAkQUoavfcdxUMEthzrjVpryORyupHtvIBYu2ENtUZRAos5 sdibCjNBBXzg== X-IronPort-AV: E=McAfee;i="6000,8403,9765"; a="144338712" X-IronPort-AV: E=Sophos;i="5.77,342,1596524400"; d="scan'208";a="144338712" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Oct 2020 03:00:00 -0700 IronPort-SDR: l8d7+2glGxsvEMWRkntkNu1UlYrZX7A6snMYKwG3Y9HkrecsENAHK28csKPQaYAfJ7Lue9yEmt Glio/5dffXMA== X-IronPort-AV: E=Sophos;i="5.77,342,1596524400"; d="scan'208";a="527275642" Received: from kchandar-mobl.ger.corp.intel.com (HELO localhost) ([10.252.50.35]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Oct 2020 02:59:58 -0700 From: Jani Nikula To: imre.deak@intel.com In-Reply-To: <20201006095543.GA1494421@ideak-desk.fi.intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <20201003010708.1272753-1-imre.deak@intel.com> <20201005215311.1475666-1-imre.deak@intel.com> <87d01vk7vh.fsf@intel.com> <20201006095543.GA1494421@ideak-desk.fi.intel.com> Date: Tue, 06 Oct 2020 13:00:21 +0300 Message-ID: <87a6wzk72i.fsf@intel.com> MIME-Version: 1.0 Subject: Re: [Intel-gfx] [PATCH v3 2/5] drm/i915: Move the initial fastset commit check to encoder hooks 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: , Cc: intel-gfx@lists.freedesktop.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Tue, 06 Oct 2020, Imre Deak wrote: > On Tue, Oct 06, 2020 at 12:42:58PM +0300, Jani Nikula wrote: >> On Tue, 06 Oct 2020, Imre Deak wrote: >> > +static bool gen11_dsi_initial_fastset_check(struct intel_encoder *encoder, >> > + struct intel_crtc_state *crtc_state) >> > +{ >> > + if (crtc_state->dsc.compression_enable) { >> > + drm_dbg_kms(encoder->base.dev, "Forcing full modeset due to DSC being enabled\n"); >> > + crtc_state->uapi.mode_changed = true; >> >> Just musing... if it's a *check*, why do we pass in a non-const >> crtc_state and modify it here? >> >> Would it not be cleaner to pass in const crtc_state and set >> crtc_state->uapi.mode_changed in the caller based on the return value? > > The encoder can update the *_changed flags in crtc_state depending on > what is preventing a fastset. Okay... is this a good design? ;) BR, Jani. -- Jani Nikula, Intel Open Source Graphics Center _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx