From: Javier Martinez Canillas <javierm@redhat.com>
To: Thomas Zimmermann <tzimmermann@suse.de>,
simona@ffwll.ch, airlied@gmail.com,
maarten.lankhorst@linux.intel.com, mripard@kernel.org
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 08/18] drm/sysfb: Merge connector functions
Date: Mon, 24 Mar 2025 09:53:38 +0100 [thread overview]
Message-ID: <87o6xqzu5p.fsf@minerva.mail-host-address-is-not-set> (raw)
In-Reply-To: <c25ba88e-1ef9-4d7e-a055-5f7302610179@suse.de>
Thomas Zimmermann <tzimmermann@suse.de> writes:
Hello Thomas,
> Hi Javier
>
> Am 23.03.25 um 11:57 schrieb Javier Martinez Canillas:
>> Thomas Zimmermann <tzimmermann@suse.de> writes:
>>
>>> Merge the connector functions of ofdrm and simpledrm. Replace the
>>> code in each driver with the shared helpers. Set up callbacks with
>>> initializer macros.
>>>
>>> No effective code changes. The sysfb connector only returns the
>>> preconfigured display mode.
>>>
>>> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
>>> ---
>> ...
>>
>>> +#define DRM_SYSFB_CONNECTOR_FUNCS \
>>> + .reset = drm_atomic_helper_connector_reset, \
>>> + .fill_modes = drm_helper_probe_single_connector_modes, \
>>> + .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state, \
>>> + .atomic_destroy_state = drm_atomic_helper_connector_destroy_state
>>> +
>>> /*
>> ...
>>
>>> static const struct drm_connector_funcs ofdrm_connector_funcs = {
>>> - .reset = drm_atomic_helper_connector_reset,
>>> - .fill_modes = drm_helper_probe_single_connector_modes,
>>> + DRM_SYSFB_CONNECTOR_FUNCS,
>>> .destroy = drm_connector_cleanup,
>> Why not include the .destroy callback in DRM_SYSFB_CONNECTOR_FUNCS ?
>
> These sysfb helpers provide functionality to operate on the output
> (damage handling, etc).
>
> The destroy callback depends on the way the mode-setting pipeline is
> organized. The driver controls this. It might wants to allocated the
> connector separately or use a container structure (e.g., struct
> ofdrm_connector) that needs separate cleanup. Hence the driver has to
> control the destroy callback. That argument goes for all the other
> elements of the pipeline.
>
Thanks for the explanation. Makes sense.
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
--
Best regards,
Javier Martinez Canillas
Core Platforms
Red Hat
next prev parent reply other threads:[~2025-03-24 8:53 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-19 7:44 [PATCH 00/18] drm: Provide helpers for system framebuffers and add efidrm/vesadrm Thomas Zimmermann
2025-03-19 7:45 ` [PATCH 01/18] drm/ofdrm: Remove struct ofdrm_device.pdev Thomas Zimmermann
2025-03-23 10:10 ` Javier Martinez Canillas
2025-03-19 7:45 ` [PATCH 02/18] drm/ofdrm: Open-code drm_simple_encoder_init() Thomas Zimmermann
2025-03-23 10:12 ` Javier Martinez Canillas
2025-03-19 7:45 ` [PATCH 03/18] drm/simpledrm: Remove struct simpledrm_device.nformats Thomas Zimmermann
2025-03-23 10:17 ` Javier Martinez Canillas
2025-03-19 7:45 ` [PATCH 04/18] drm: Move sysfb drivers into separate subdirectory Thomas Zimmermann
2025-03-23 10:21 ` Javier Martinez Canillas
2025-03-19 7:45 ` [PATCH 05/18] drm/sysfb: Add struct drm_sysfb_device Thomas Zimmermann
2025-03-23 10:39 ` Javier Martinez Canillas
2025-03-19 7:45 ` [PATCH 06/18] drm/sysfb: Provide single mode-init helper Thomas Zimmermann
2025-03-23 10:41 ` Javier Martinez Canillas
2025-03-19 7:45 ` [PATCH 07/18] drm/sysfb: Merge mode-config functions Thomas Zimmermann
2025-03-23 10:47 ` Javier Martinez Canillas
2025-03-19 7:45 ` [PATCH 08/18] drm/sysfb: Merge connector functions Thomas Zimmermann
2025-03-23 10:57 ` Javier Martinez Canillas
2025-03-24 7:37 ` Thomas Zimmermann
2025-03-24 8:53 ` Javier Martinez Canillas [this message]
2025-03-19 7:45 ` [PATCH 09/18] drm/sysfb: Maintain CRTC state in struct drm_sysfb_crtc_state Thomas Zimmermann
2025-03-31 8:08 ` Javier Martinez Canillas
2025-03-19 7:45 ` [PATCH 10/18] drm/sysfb: Merge CRTC functions Thomas Zimmermann
2025-03-31 9:00 ` Javier Martinez Canillas
2025-03-19 7:45 ` [PATCH 11/18] drm/sysfb: Merge primary-plane functions Thomas Zimmermann
2025-03-31 9:12 ` Javier Martinez Canillas
2025-03-19 7:45 ` [PATCH 12/18] drm/sysfb: ofdrm: Add EDID support Thomas Zimmermann
2025-03-20 12:50 ` Jani Nikula
2025-03-20 13:08 ` Thomas Zimmermann
2025-03-31 9:26 ` Maxime Ripard
2025-03-31 9:32 ` Thomas Zimmermann
2025-03-31 9:15 ` Javier Martinez Canillas
2025-03-19 7:45 ` [PATCH 13/18] firmware: sysfb: Move bpp-depth calculation into screen_info helper Thomas Zimmermann
2025-03-31 9:24 ` Javier Martinez Canillas
2025-03-19 7:45 ` [PATCH 14/18] drm/sysfb: Add efidrm for EFI displays Thomas Zimmermann
2025-03-31 9:35 ` Javier Martinez Canillas
2025-03-19 7:45 ` [PATCH 15/18] drm/sysfb: efidrm: Add EDID support Thomas Zimmermann
2025-03-31 9:37 ` Javier Martinez Canillas
2025-03-19 7:45 ` [PATCH 16/18] drm/sysfb: Add vesadrm for VESA displays Thomas Zimmermann
2025-03-31 9:42 ` Javier Martinez Canillas
2025-03-19 7:45 ` [PATCH 17/18] drm/sysfb: vesadrm: Add EDID support Thomas Zimmermann
2025-03-31 9:44 ` Javier Martinez Canillas
2025-03-19 7:45 ` [PATCH 18/18] drm/sysfb: vesadrm: Add gamma correction Thomas Zimmermann
2025-03-31 9:47 ` Javier Martinez Canillas
2025-03-19 12:50 ` [PATCH 00/18] drm: Provide helpers for system framebuffers and add efidrm/vesadrm nerdopolis
2025-03-19 12:59 ` Thomas Zimmermann
2025-03-31 13:39 ` Thomas Zimmermann
2025-04-02 2:44 ` nerdopolis
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=87o6xqzu5p.fsf@minerva.mail-host-address-is-not-set \
--to=javierm@redhat.com \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=simona@ffwll.ch \
--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;
as well as URLs for NNTP newsgroup(s).