dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: Jocelyn Falempe <jfalempe@redhat.com>,
	dri-devel@lists.freedesktop.org, airlied@redhat.com,
	maarten.lankhorst@linux.intel.com, mripard@kernel.org,
	daniel@ffwll.ch, javierm@redhat.com,
	bluescreen_avenger@verizon.net, noralf@tronnes.org,
	sui.jingfeng@linux.dev
Cc: gpiccoli@igalia.com
Subject: Re: [PATCH v11 2/9] drm/panic: Add a drm panic handler
Date: Tue, 9 Apr 2024 10:30:35 +0200	[thread overview]
Message-ID: <6fe7d003-6dbd-4df2-bf33-a6925810358d@suse.de> (raw)
In-Reply-To: <20240328120638.468738-3-jfalempe@redhat.com>

Hi

Am 28.03.24 um 13:03 schrieb Jocelyn Falempe:
> +/**
> + * struct drm_scanout_buffer - DRM scanout buffer
> + *
> + * This structure holds the information necessary for drm_panic to draw the
> + * panic screen, and display it.
> + */
> +struct drm_scanout_buffer {
> +	/**
> +	 * @format:
> +	 *
> +	 * drm format of the scanout buffer.
> +	 */
> +	const struct drm_format_info *format;

Newline here and among the other fields please.

> +	/**
> +	 * @map:
> +	 *
> +	 * Virtual address of the scanout buffer, either in memory or iomem.
> +	 * The scanout buffer should be in linear format, and can be directly
> +	 * sent to the display hardware. Tearing is not an issue for the panic
> +	 * screen.
> +	 */
> +	struct iosys_map map;

I would make this an array of DRM_FORMAT_MAX_PLANES. Its functionality 
is then equivalent to the fields in struct drm_framebuffer. Supporting 
multiple color planes is the general expectation in the DRM code, even 
if not all parts actually implement it. In the panic code, you simply 
test that the scan-out format has only a single plane.

   struct iosys_map map[DRM_FORMAT_MAX_PLANES]


> +	/**
> +	 * @width: Width of the scanout buffer, in pixels.
> +	 */
> +	unsigned int width;
> +	/**
> +	 * @height: Height of the scanout buffer, in pixels.
> +	 */
> +	unsigned int height;
> +	/**
> +	 * @pitch: Length in bytes between the start of two consecutive lines.
> +	 */
> +	unsigned int pitch;

Also use an array of DRM_FORMAT_MAX_PLANES.

> +};

This data structure looks like something I could use for the 
shadow-plane helpers. Expect it to be moved elsewhere at some point.

Best regards
Thomas


-- 
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)


  reply	other threads:[~2024-04-09  8:30 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-28 12:03 [PATCH v11 0/9] drm/panic: Add a drm panic handler Jocelyn Falempe
2024-03-28 12:03 ` [PATCH v11 1/9] drm/panic: Add drm panic locking Jocelyn Falempe
2024-04-02  2:28   ` nerdopolis
2024-03-28 12:03 ` [PATCH v11 2/9] drm/panic: Add a drm panic handler Jocelyn Falempe
2024-04-09  8:30   ` Thomas Zimmermann [this message]
2024-04-09 14:11     ` Jocelyn Falempe
2024-04-10  8:13       ` Thomas Zimmermann
2024-03-28 12:03 ` [PATCH v11 3/9] drm/panic: Add support for color format conversion Jocelyn Falempe
2024-03-28 12:03 ` [PATCH v11 4/9] drm/panic: Add debugfs entry to test without triggering panic Jocelyn Falempe
2024-03-28 12:03 ` [PATCH v11 5/9] drm/fb_dma: Add generic get_scanout_buffer() for drm_panic Jocelyn Falempe
2024-04-09  8:21   ` Thomas Zimmermann
2024-04-09 14:13     ` Jocelyn Falempe
2024-03-28 12:03 ` [PATCH v11 6/9] drm/simpledrm: Add drm_panic support Jocelyn Falempe
2024-03-28 12:03 ` [PATCH v11 7/9] drm/mgag200: " Jocelyn Falempe
2024-03-28 12:03 ` [PATCH v11 8/9] drm/imx: " Jocelyn Falempe
2024-03-28 12:03 ` [PATCH v11 9/9] drm/ast: " Jocelyn Falempe
2024-04-09  8:33 ` [PATCH v11 0/9] drm/panic: Add a drm panic handler 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=6fe7d003-6dbd-4df2-bf33-a6925810358d@suse.de \
    --to=tzimmermann@suse.de \
    --cc=airlied@redhat.com \
    --cc=bluescreen_avenger@verizon.net \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gpiccoli@igalia.com \
    --cc=javierm@redhat.com \
    --cc=jfalempe@redhat.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=noralf@tronnes.org \
    --cc=sui.jingfeng@linux.dev \
    /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