From patchwork Tue Dec 21 19:37:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 12690485 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id B4CF7C433EF for ; Tue, 21 Dec 2021 19:38:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0FDD311238D; Tue, 21 Dec 2021 19:38:00 +0000 (UTC) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4FD9210F70B; Tue, 21 Dec 2021 19:37:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1640115478; x=1671651478; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=lnQLTHpmTtqADYHA5jI8pdWF3mm1J1Q+wUCTPMgKO6k=; b=ieVhiok0ifY7zPAeYJzy/2HvbDFPsJ57hrgzCnB4NToaAbx+KKPWz72R 1eGAW1ME0vEJvfFl0zeXhqiSiPY1bBnHA3tGZWuCSbeBGBi5Ej4hyPQwE JgMHuSTc4IKegz5h9BjJs+9nhBaAWsp1lO96PqIZR3g+v2stng45uaKOh eJZ4NHf468yObQP5iLHpYBk5Q9pZnitmETAQYOIwy0ClIeSfu4EdKExiI M8XRQmerAY8dAzdtiswWaa4ggjkPCoy2QgijXzOwxelsT6k0NyZHAEgUO +NzmAn/KRtcfsqAcMaQ5D11Zqbek5DKj8pmcVPpSBrP51cQ3GiBIcV/iU Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10205"; a="227773894" X-IronPort-AV: E=Sophos;i="5.88,224,1635231600"; d="scan'208";a="227773894" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Dec 2021 11:37:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,224,1635231600"; d="scan'208";a="664054639" Received: from stinkbox.fi.intel.com (HELO stinkbox) ([10.237.72.147]) by fmsmga001.fm.intel.com with SMTP; 21 Dec 2021 11:37:54 -0800 Received: by stinkbox (sSMTP sendmail emulation); Tue, 21 Dec 2021 21:37:54 +0200 From: Ville Syrjala To: dri-devel@lists.freedesktop.org Subject: [PATCH 1/2] drm: Always include the debugfs dentry in drm_crtc Date: Tue, 21 Dec 2021 21:37:53 +0200 Message-Id: <20211221193754.12287-1-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.32.0 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: , Cc: Jani Nikula , Nathan Chancellor , intel-gfx@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Ville Syrjälä Remove the counterproductive CONFIG_DEBUG_FS ifdef and just include the debugfs dentry in drm_crtc always. This way we don't need annoying ifdefs in the actual code with DEBUGFS=n. Also we don't have these ifdefs around any of the other debugfs dentries either so can't see why drm_crtc should be special. This fixes the i915 DEBUGFS=n build because I assumed the dentry would always be there. Cc: Jani Nikula Reported-by: Nathan Chancellor Tested-by: Nathan Chancellor Fixes: e74c6aa955ca ("drm/i915/fbc: Register per-crtc debugfs files") Signed-off-by: Ville Syrjälä Reviewed-by: Jani Nikula --- include/drm/drm_crtc.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index 13eeba2a750a..4d01b4d89775 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h @@ -1135,14 +1135,12 @@ struct drm_crtc { */ spinlock_t commit_lock; -#ifdef CONFIG_DEBUG_FS /** * @debugfs_entry: * * Debugfs directory for this CRTC. */ struct dentry *debugfs_entry; -#endif /** * @crc: From patchwork Tue Dec 21 19:37:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 12690487 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 6320EC433FE for ; Tue, 21 Dec 2021 19:38:05 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 47DE910FED7; Tue, 21 Dec 2021 19:38:03 +0000 (UTC) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6A76D112416; Tue, 21 Dec 2021 19:38:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1640115481; x=1671651481; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ujzt86LagKjMqdhM1H0x0oLwJXXrZUzmaZ6yFafsd+Q=; b=eSQcxbWnxX5BhiiNt2BNlkL6UEzfW35VmKzMDrumZlDEucHrw9Ic7Jb3 cdkEhDfLPqqCA3kMd6Yx0/bamCzTod+5KqobIQNYCfs/JZiX/qkez9stx SrqntgB8n3DId6gD0j6GMXR2eGsU45qmWEKVVPaRuyGdu5tm34PBfjGf5 blBY9kS3xcxWGkOr+edU+y00QQREcrZscQlHqVRR7G7kuiVrbYz1H+DbW b/hO5ICLWn8z0XjW00VWfyxlMU3U4xRHylOnz0rbQX45OFS87bQpv53QG /ICY2wyS1QX3gab1L2VCBlJWj1WWsvncLDada1obJs0cMzvlB9FDteIIF Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10205"; a="240433722" X-IronPort-AV: E=Sophos;i="5.88,224,1635231600"; d="scan'208";a="240433722" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Dec 2021 11:38:00 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,224,1635231600"; d="scan'208";a="521384617" Received: from stinkbox.fi.intel.com (HELO stinkbox) ([10.237.72.147]) by orsmga008.jf.intel.com with SMTP; 21 Dec 2021 11:37:58 -0800 Received: by stinkbox (sSMTP sendmail emulation); Tue, 21 Dec 2021 21:37:57 +0200 From: Ville Syrjala To: dri-devel@lists.freedesktop.org Subject: [PATCH 2/2] drm/dbi: Use a static inline stub for mipi_dbi_debugfs_init() Date: Tue, 21 Dec 2021 21:37:54 +0200 Message-Id: <20211221193754.12287-2-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211221193754.12287-1-ville.syrjala@linux.intel.com> References: <20211221193754.12287-1-ville.syrjala@linux.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: , Cc: intel-gfx@lists.freedesktop.org, =?utf-8?q?Noralf_Tr=C3=B8nnes?= , Sam Ravnborg Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Ville Syrjälä Replace the slightly odd "#define NULL" thing with a standard static inline stub. Cc: Noralf Trønnes Cc: Sam Ravnborg Signed-off-by: Ville Syrjälä --- include/drm/drm_mipi_dbi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/drm/drm_mipi_dbi.h b/include/drm/drm_mipi_dbi.h index 05e194958265..6fe13cce2670 100644 --- a/include/drm/drm_mipi_dbi.h +++ b/include/drm/drm_mipi_dbi.h @@ -194,7 +194,7 @@ int mipi_dbi_buf_copy(void *dst, struct drm_framebuffer *fb, #ifdef CONFIG_DEBUG_FS void mipi_dbi_debugfs_init(struct drm_minor *minor); #else -#define mipi_dbi_debugfs_init NULL +static inline void mipi_dbi_debugfs_init(struct drm_minor *minor) {} #endif #endif /* __LINUX_MIPI_DBI_H */