From: Jani Nikula <jani.nikula@linux.intel.com>
To: Jocelyn Falempe <jfalempe@redhat.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
John Ogness <john.ogness@linutronix.de>,
Javier Martinez Canillas <javierm@redhat.com>,
"Guilherme G . Piccoli" <gpiccoli@igalia.com>,
bluescreen_avenger@verizon.net,
Caleb Connolly <caleb.connolly@linaro.org>,
Petr Mladek <pmladek@suse.com>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v8 1/6] drm/panic: Move drawing functions to drm_draw
Date: Tue, 03 Dec 2024 16:08:23 +0200 [thread overview]
Message-ID: <87ed2o506g.fsf@intel.com> (raw)
In-Reply-To: <a51f2945-4eff-411e-83ad-838e69daeb6a@redhat.com>
On Tue, 03 Dec 2024, Jocelyn Falempe <jfalempe@redhat.com> wrote:
> On 03/12/2024 12:06, Jani Nikula wrote:
>> On Fri, 15 Nov 2024, Jocelyn Falempe <jfalempe@redhat.com> wrote:
>>> Move the color conversions, blit and fill functions to drm_draw.c,
>>> so that they can be re-used by drm_log.
>>> drm_draw is internal to the drm subsystem, and shouldn't be used by
>>> gpu drivers.
>>
>> I started looking at this in patch 2:
>>
>>> +#include "../drm_draw.h"
>>
>> I think we should avoid #includes with ../ like this.
>
> Sure, I've added it in v8, after the clients moved to drm/clients/, but
> I didn't think much about it.
>
>>
>> Either drm_draw.h belongs in include/drm, or maybe clients/Makefile
>> needs to add subdir-ccflags-y += -I$(src)/.. or something like that?
>>
>> If it's supposed to be internal, I guess the latter, but then the
>> current convention is to have _internal.h suffix. All drm headers under
>> drivers/ have that.
>
> ok, I can rename drm_draw.h to drm_draw_internal.h, and add the include
> in the Makefile.
>>
>> Is this the first drm subsystem internal thing that's a separate module?
>> Should we use EXPORT_SYMBOL_NS() and MODULE_IMPORT_NS() to enforce it
>> being internal?
>
> It's not really a separate module, as it's built in the core drm module.
> (the reason is that it's used by drm_panic too, which must be in the
> core drm module).
Right, sorry, I got confused and looked at this the other way round.
drm_draw is part of drm.ko, drm log is part of drm_client_lib.ko, and
uses drm_draw, right?
So is drm_draw really internal if drm client uses it?
I don't really deeply care either way, but it bugs me when it's
somewhere in between. :)
Either include/drm/drm_draw.h or drivers/gpu/drm/drm_draw_internal.h,
the latter *possibly* with symbol namespace, but not a big deal.
BR,
Jani.
>
> I don't know much about symbol namespace, but I can add that if needed.
>
> Best regards,
--
Jani Nikula, Intel
next prev parent reply other threads:[~2024-12-03 14:08 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-15 13:40 [PATCH v8 0/6] drm/log: Introduce a new boot logger to draw the kmsg on the screen Jocelyn Falempe
2024-11-15 13:40 ` [PATCH v8 1/6] drm/panic: Move drawing functions to drm_draw Jocelyn Falempe
2024-12-03 11:06 ` Jani Nikula
2024-12-03 13:56 ` Jocelyn Falempe
2024-12-03 14:08 ` Jani Nikula [this message]
2024-12-03 14:19 ` Jocelyn Falempe
2024-12-03 14:44 ` Thomas Zimmermann
2024-12-04 8:43 ` Jani Nikula
2024-11-15 13:40 ` [PATCH v8 2/6] drm/log: Introduce a new boot logger to draw the kmsg on the screen Jocelyn Falempe
2024-12-03 8:48 ` Thomas Zimmermann
2024-12-03 9:22 ` Jocelyn Falempe
2024-12-03 9:35 ` Thomas Zimmermann
2024-12-03 9:56 ` Jocelyn Falempe
2024-11-15 13:40 ` [PATCH v8 3/6] drm/log: Do not draw if drm_master is taken Jocelyn Falempe
2024-11-15 13:40 ` [PATCH v8 4/6] drm/log: Color the timestamp, to improve readability Jocelyn Falempe
2024-11-15 13:40 ` [PATCH v8 5/6] drm/log: Implement suspend/resume Jocelyn Falempe
2024-11-15 13:40 ` [PATCH v8 6/6] drm/log: Add integer scaling support Jocelyn Falempe
2024-12-03 8:50 ` [PATCH v8 0/6] drm/log: Introduce a new boot logger to draw the kmsg on the screen 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=87ed2o506g.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=airlied@gmail.com \
--cc=bluescreen_avenger@verizon.net \
--cc=caleb.connolly@linaro.org \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=gpiccoli@igalia.com \
--cc=javierm@redhat.com \
--cc=jfalempe@redhat.com \
--cc=john.ogness@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=pmladek@suse.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.