mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Neil Armstrong <narmstrong@baylibre.com>
To: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Cc: linux-omap@vger.kernel.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org, khilman@baylibre.com,
	Benoit Parrot <bparrot@ti.com>
Subject: Re: [PATCH v6 8/9] drm/omap: add plane_atomic_print_state support
Date: Wed, 27 Oct 2021 14:46:42 +0200	[thread overview]
Message-ID: <0423c635-7121-b603-a52c-c68dde4c8c30@baylibre.com> (raw)
In-Reply-To: <70a29d4d-eaab-5162-58b7-df9d9d3e7a9b@ideasonboard.com>

On 27/10/2021 14:23, Tomi Valkeinen wrote:
> On 18/10/2021 17:28, Neil Armstrong wrote:
>> From: Benoit Parrot <bparrot@ti.com>
>>
>> Now that we added specific item to our subclassed drm_plane_state
>> we can add omap_plane_atomic_print_state() helper to dump out our own
>> driver specific plane state.
>>
>> Signed-off-by: Benoit Parrot <bparrot@ti.com>
>> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
>> ---
>>   drivers/gpu/drm/omapdrm/omap_plane.c | 16 ++++++++++++++++
>>   1 file changed, 16 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/omapdrm/omap_plane.c b/drivers/gpu/drm/omapdrm/omap_plane.c
>> index ce5ed45401fb..5001c8354e4f 100644
>> --- a/drivers/gpu/drm/omapdrm/omap_plane.c
>> +++ b/drivers/gpu/drm/omapdrm/omap_plane.c
>> @@ -348,6 +348,21 @@ omap_plane_atomic_duplicate_state(struct drm_plane *plane)
>>       return &state->base;
>>   }
>>   +static void omap_plane_atomic_print_state(struct drm_printer *p,
>> +                      const struct drm_plane_state *state)
>> +{
>> +    struct omap_plane_state *omap_state = to_omap_plane_state(state);
>> +
>> +    drm_printf(p, "\toverlay=%s\n", omap_state->overlay ?
>> +                    omap_state->overlay->name : "(null)");
>> +    if (omap_state->overlay) {
>> +        drm_printf(p, "\t\tidx=%d\n", omap_state->overlay->idx);
>> +        drm_printf(p, "\t\toverlay_id=%d\n",
>> +               omap_state->overlay->id);
>> +        drm_printf(p, "\t\tcaps=0x%x\n", omap_state->overlay->caps);
>> +    }
>> +}
> 
> This prints:
> 
>         overlay=gfx
>                 idx=0
>                 overlay_id=0
>                 caps=0x3e
> 
> I'm not sure if some of these details are needed. The name ("gfx") and overlay_id refer to the same thing, and while idx is in theory a different value, in practice it's always the same as overlay_id. And even if it was a different number, I think idx is kind of irrelevant, isn't it?
> 
> caps can be figured out from the name of the overlay, but perhaps it doesn't hurt to print them here. Then again, if none of the other debug prints show the cap values (e.g. "requires cap 0x4), maybe printing the caps value is not really useful here.
> 
> Maybe this could be just a single line, say:
> 
> overlay=gfx
> 
> or if caps is useful:
> 
> overlay=gfx (caps=0x3e)
> 
> What do you think?

I'm ok with that.

Thanks,
Neil

> 
>  Tomi


  reply	other threads:[~2021-10-27 12:46 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-18 14:28 [PATCH v6 0/9] drm/omap: Add virtual-planes support Neil Armstrong
2021-10-18 14:28 ` [PATCH v6 1/9] drm/omap: add sanity plane state check Neil Armstrong
2021-10-27  8:29   ` Tomi Valkeinen
2021-10-27  8:30     ` Tomi Valkeinen
2021-11-09 13:10       ` Neil Armstrong
2021-10-18 14:28 ` [PATCH v6 2/9] drm/omap: Add ability to check if requested plane modes can be supported Neil Armstrong
2021-10-27  8:34   ` Tomi Valkeinen
2021-10-18 14:28 ` [PATCH v6 3/9] drm/omap: Add ovl checking funcs to dispc_ops Neil Armstrong
2021-10-27  8:35   ` Tomi Valkeinen
2021-10-18 14:28 ` [PATCH v6 4/9] drm/omap: introduce omap_hw_overlay Neil Armstrong
2021-10-27 10:50   ` Tomi Valkeinen
2021-10-18 14:28 ` [PATCH v6 5/9] drm/omap: omap_plane: subclass drm_plane_state Neil Armstrong
2021-10-27 10:50   ` Tomi Valkeinen
2021-10-18 14:28 ` [PATCH v6 6/9] drm/omap: Add global state as a private atomic object Neil Armstrong
2021-10-18 14:28 ` [PATCH v6 7/9] drm/omap: dynamically assign hw overlays to planes Neil Armstrong
2021-10-18 14:28 ` [PATCH v6 8/9] drm/omap: add plane_atomic_print_state support Neil Armstrong
2021-10-27 12:23   ` Tomi Valkeinen
2021-10-27 12:46     ` Neil Armstrong [this message]
2021-10-18 14:28 ` [PATCH v6 9/9] drm/omap: Add a 'right overlay' to plane state Neil Armstrong
2021-10-27 12:50   ` Tomi Valkeinen
2021-11-09 13:31     ` Neil Armstrong

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=0423c635-7121-b603-a52c-c68dde4c8c30@baylibre.com \
    --to=narmstrong@baylibre.com \
    --cc=bparrot@ti.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=khilman@baylibre.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=tomi.valkeinen@ideasonboard.com \
    /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

all inboxes | Powered by JetHome®