Linux Documentation
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Thomas Zimmermann <tzimmermann@suse.de>,
	airlied@linux.ie, daniel@ffwll.ch,
	maarten.lankhorst@linux.intel.com, mripard@kernel.org,
	corbet@lwn.net
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	dri-devel@lists.freedesktop.org, linux-doc@vger.kernel.org
Subject: Re: [PATCH 1/3] drm/aperture: Add infrastructure for aperture ownership
Date: Mon, 12 Apr 2021 12:36:44 +0300	[thread overview]
Message-ID: <87mtu3kfo3.fsf@intel.com> (raw)
In-Reply-To: <20210412090021.23054-2-tzimmermann@suse.de>

On Mon, 12 Apr 2021, Thomas Zimmermann <tzimmermann@suse.de> 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.com>



-- 
Jani Nikula, Intel Open Source Graphics Center

  reply	other threads:[~2021-04-12  9:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-12  9:00 [PATCH 0/3] drm: Add aperture helpers Thomas Zimmermann
2021-04-12  9:00 ` [PATCH 1/3] drm/aperture: Add infrastructure for aperture ownership Thomas Zimmermann
2021-04-12  9:36   ` Jani Nikula [this message]
2021-04-12 10:31     ` Thomas Zimmermann
2021-04-12 10:41       ` Jani Nikula
2021-04-12 10:56         ` Thomas Zimmermann
2021-04-12  9:00 ` [PATCH 2/3] drm/aperture: Convert drivers to aperture interfaces Thomas Zimmermann
2021-04-12  9:00 ` [PATCH 3/3] drm/aperture: Inline fbdev conflict helpers into aperture helpers Thomas Zimmermann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mtu3kfo3.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=airlied@linux.ie \
    --cc=corbet@lwn.net \
    --cc=daniel.vetter@ffwll.ch \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox