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=-8.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 280EBC433ED for ; Mon, 12 Apr 2021 09:45:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E6A646127A for ; Mon, 12 Apr 2021 09:45:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237532AbhDLJpV (ORCPT ); Mon, 12 Apr 2021 05:45:21 -0400 Received: from mga18.intel.com ([134.134.136.126]:19008 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241188AbhDLJhP (ORCPT ); Mon, 12 Apr 2021 05:37:15 -0400 IronPort-SDR: B1ftWdqansXOm5tSRSMvKo9Dj41eQVyvaLCrycbBs7pZ3dVFjTKztDinXnDa235kJ8RudSOuC2 AoZCVyhhbHxQ== X-IronPort-AV: E=McAfee;i="6000,8403,9951"; a="181670669" X-IronPort-AV: E=Sophos;i="5.82,216,1613462400"; d="scan'208";a="181670669" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Apr 2021 02:36:51 -0700 IronPort-SDR: BBCOyapemeK9QZkDPBZxXvoR2i98nYdREezj2tp28wTBkgLtXJB+Xt78hIAApuRKeB+lVe58sq BSfQQBkcXE7g== X-IronPort-AV: E=Sophos;i="5.82,216,1613462400"; d="scan'208";a="417310215" Received: from cyeni-mobl.ger.corp.intel.com (HELO localhost) ([10.252.62.41]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Apr 2021 02:36:47 -0700 From: Jani Nikula To: Thomas Zimmermann , airlied@linux.ie, daniel@ffwll.ch, maarten.lankhorst@linux.intel.com, mripard@kernel.org, corbet@lwn.net Cc: Daniel Vetter , Thomas Zimmermann , dri-devel@lists.freedesktop.org, linux-doc@vger.kernel.org Subject: Re: [PATCH 1/3] drm/aperture: Add infrastructure for aperture ownership In-Reply-To: <20210412090021.23054-2-tzimmermann@suse.de> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <20210412090021.23054-1-tzimmermann@suse.de> <20210412090021.23054-2-tzimmermann@suse.de> Date: Mon, 12 Apr 2021 12:36:44 +0300 Message-ID: <87mtu3kfo3.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-doc@vger.kernel.org On Mon, 12 Apr 2021, Thomas Zimmermann wrote: > + * DRM drivers should call drm_aperture_remove_conflicting_framebuffers() > + * at the top of their probe function. The function removes any generic > + * driver that is currently associated with the given framebuffer memory. > + * If the framebuffer is located at PCI BAR 0, the rsp code looks as in the > + * example given below. > + * > + * .. code-block:: c > + * > + * static int remove_conflicting_framebuffers(struct pci_dev *pdev) > + * { > + * bool primary = false; > + * resource_size_t base, size; > + * int ret; > + * > + * base = pci_resource_start(pdev, 0); > + * size = pci_resource_len(pdev, 0); > + * #ifdef CONFIG_X86 > + * primary = pdev->resource[PCI_ROM_RESOURCE].flags & IORESOURCE_ROM_SHADOW; > + * #endif > + * > + * return drm_aperture_remove_conflicting_framebuffers(base, size, primary, > + * "example driver"); > + * } > + * > + * static int probe(struct pci_dev *pdev) > + * { > + * int ret; > + * > + * // Remove any generic drivers... > + * ret = remove_conflicting_framebuffers(pdev); > + * if (ret) > + * return ret; > + * > + * // ... and initialize the hardware. > + * ... > + * > + * drm_dev_register(); > + * > + * return 0; > + * } I'm guessing you can't use tabs for the first indentation level here. IIRC kernel-doc removes the leading comment marker and one whitespace whether it's space or tab, resulting in rst where the code-block contents are only partially indented. Please test the documentation build before applying. Otherwise, the series seems like a nice cleanup. Acked-by: Jani Nikula -- Jani Nikula, Intel Open Source Graphics Center 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=-8.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 8165AC433B4 for ; Mon, 12 Apr 2021 09:36:57 +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 3768261209 for ; Mon, 12 Apr 2021 09:36:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3768261209 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 A672C6E05D; Mon, 12 Apr 2021 09:36:56 +0000 (UTC) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6A7216E05D for ; Mon, 12 Apr 2021 09:36:55 +0000 (UTC) IronPort-SDR: MmMNI9NoR0zgenXU5IkeoKJROc8udDBi8KQJbw+KEknWlP/03dB1JaN3dqwvay66wwkIbWDEnY Ve4+AunQ2LlQ== X-IronPort-AV: E=McAfee;i="6000,8403,9951"; a="279450459" X-IronPort-AV: E=Sophos;i="5.82,216,1613462400"; d="scan'208";a="279450459" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Apr 2021 02:36:51 -0700 IronPort-SDR: BBCOyapemeK9QZkDPBZxXvoR2i98nYdREezj2tp28wTBkgLtXJB+Xt78hIAApuRKeB+lVe58sq BSfQQBkcXE7g== X-IronPort-AV: E=Sophos;i="5.82,216,1613462400"; d="scan'208";a="417310215" Received: from cyeni-mobl.ger.corp.intel.com (HELO localhost) ([10.252.62.41]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Apr 2021 02:36:47 -0700 From: Jani Nikula To: Thomas Zimmermann , airlied@linux.ie, daniel@ffwll.ch, maarten.lankhorst@linux.intel.com, mripard@kernel.org, corbet@lwn.net Subject: Re: [PATCH 1/3] drm/aperture: Add infrastructure for aperture ownership In-Reply-To: <20210412090021.23054-2-tzimmermann@suse.de> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <20210412090021.23054-1-tzimmermann@suse.de> <20210412090021.23054-2-tzimmermann@suse.de> Date: Mon, 12 Apr 2021 12:36:44 +0300 Message-ID: <87mtu3kfo3.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: , Cc: Daniel Vetter , dri-devel@lists.freedesktop.org, Thomas Zimmermann , linux-doc@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Mon, 12 Apr 2021, Thomas Zimmermann wrote: > + * DRM drivers should call drm_aperture_remove_conflicting_framebuffers() > + * at the top of their probe function. The function removes any generic > + * driver that is currently associated with the given framebuffer memory. > + * If the framebuffer is located at PCI BAR 0, the rsp code looks as in the > + * example given below. > + * > + * .. code-block:: c > + * > + * static int remove_conflicting_framebuffers(struct pci_dev *pdev) > + * { > + * bool primary = false; > + * resource_size_t base, size; > + * int ret; > + * > + * base = pci_resource_start(pdev, 0); > + * size = pci_resource_len(pdev, 0); > + * #ifdef CONFIG_X86 > + * primary = pdev->resource[PCI_ROM_RESOURCE].flags & IORESOURCE_ROM_SHADOW; > + * #endif > + * > + * return drm_aperture_remove_conflicting_framebuffers(base, size, primary, > + * "example driver"); > + * } > + * > + * static int probe(struct pci_dev *pdev) > + * { > + * int ret; > + * > + * // Remove any generic drivers... > + * ret = remove_conflicting_framebuffers(pdev); > + * if (ret) > + * return ret; > + * > + * // ... and initialize the hardware. > + * ... > + * > + * drm_dev_register(); > + * > + * return 0; > + * } I'm guessing you can't use tabs for the first indentation level here. IIRC kernel-doc removes the leading comment marker and one whitespace whether it's space or tab, resulting in rst where the code-block contents are only partially indented. Please test the documentation build before applying. Otherwise, the series seems like a nice cleanup. Acked-by: Jani Nikula -- Jani Nikula, Intel Open Source Graphics Center _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel