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 558E2C433E0 for ; Fri, 8 Jan 2021 13:07:52 +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 AC9B1235FC for ; Fri, 8 Jan 2021 13:07:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AC9B1235FC 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=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 94CA36E32A; Fri, 8 Jan 2021 13:07:50 +0000 (UTC) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1FCCD6E32A for ; Fri, 8 Jan 2021 13:07:49 +0000 (UTC) IronPort-SDR: n56u1FNfeKnJulBqMu9Ddj87/vAm+ZcUkOOF3tuzmi0IvGJwru4Fr8XEZnD2J+QMC4Fg0nmb2D rB+0eqLHjsoA== X-IronPort-AV: E=McAfee;i="6000,8403,9857"; a="165279994" X-IronPort-AV: E=Sophos;i="5.79,331,1602572400"; d="scan'208";a="165279994" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jan 2021 05:07:48 -0800 IronPort-SDR: XwuvPVa/RMQZzUEEBUjTkYGnzBKJkI1/KXJBjEc/NCkmVlarl3HHEBYmYmZr1/CSiDmVqeumbl 3z4LRDqZnraQ== X-IronPort-AV: E=Sophos;i="5.79,331,1602572400"; d="scan'208";a="351672981" Received: from rgwhiteh-mobl.ger.corp.intel.com (HELO localhost) ([10.213.205.160]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jan 2021 05:07:44 -0800 From: Jani Nikula To: Thomas Zimmermann , Tian Tao , airlied@linux.ie, daniel@ffwll.ch, kraxel@redhat.com, alexander.deucher@amd.com, tglx@linutronix.de, dri-devel@lists.freedesktop.org, xinliang.liu@linaro.org Subject: Re: [RFC] drm/connector: Set the default callback function for drm_connector_funcs In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <1610092442-36168-1-git-send-email-tiantao6@hisilicon.com> Date: Fri, 08 Jan 2021 15:07:41 +0200 Message-ID: <871revziea.fsf@intel.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Fri, 08 Jan 2021, Thomas Zimmermann wrote: > Drivers cannot legally declare the funcs instance as static const. > Having static const allows for write protected pages. This. I've done quite a bit of refactoring all over the place to be ablet to move to the complete opposite direction. We want to keep all callback structs static const. If the idea here was good (on which I'm inclined to side with Thomas and Daniel that it isn't), the way to go would be to add a small wrapper for calling ->fill_modes(), with a different path for when it's NULL. BR, Jani. -- Jani Nikula, Intel Open Source Graphics Center _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel