From: Brandon Pollack <brpol@chromium.org>
To: marius.vlad@collabora.com
Cc: corbet@lwn.net, dri-devel@lists.freedesktop.org,
hamohammed.sa@gmail.com, jshargo@chromium.org,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
mairacanal@riseup.net, melissa.srw@gmail.com, mripard@kernel.org,
rodrigosiqueiramelo@gmail.com, tzimmermann@suse.de
Subject: Re: [PATCH v2 2/6] drm/vkms: Support multiple DRM objects (crtcs, etc.) per VKMS device
Date: Fri, 18 Aug 2023 03:36:05 +0000 [thread overview]
Message-ID: <20230818033605.2910699-1-brpol@chromium.org> (raw)
In-Reply-To: <ZNthoImm48DYrBJx@xpredator>
Thanks for taking the time, everyone! Sorry it took so long, we had some
internal shuffling etc going on and I was building out what we needed these
chagnes for in the first place, this will be the first of a few replies
followed by a new version of the series to be sent out.
First up is a respons to Maria, Marius to follow.
---
Maria,
> - if (vkms->output.composer_workq)
> - destroy_workqueue(vkms->output.composer_workq);
> + for (int i = 0; i < vkms->output.num_crtcs; i++)
> + destroy_workqueue(vkms->output.crtcs[i].composer_workq);
I don't believe there is any need for a null check. If you look in the
crtc_init, it is zero'd before returning any errors and that is the only place
it is set. I don't believe that release can be called by an interrupt/async
(and if it did it would need a mutex/lock anyway).
>
> static const struct drm_plane_funcs vkms_plane_funcs = {
> - .update_plane = drm_atomic_helper_update_plane,
> - .disable_plane = drm_atomic_helper_disable_plane,
> - .reset = vkms_plane_reset,
Yeah these do seem weirdly formatted on devices that don't treat tabs well.
The default formatter on my editor has a few suggestions for this file, but
they are all optional. I'll send an extra patch that formats stuff and see
what people think, but ill make it seperate after all this is done.
For now I reverted this.
>> - if (IS_ERR(plane))
>> - return plane;
>> + if (output->num_planes >= VKMS_MAX_PLANES)
>> + return ERR_PTR(-ENOMEM);
>> +
>> + plane = &output->planes[output->num_planes++];
>> + ret = drm_universal_plane_init(dev, &plane->base, 0, &vkms_plane_funcs,
>> + vkms_formats, ARRAY_SIZE(vkms_formats),
>> + NULL, type, NULL);
>
>Wouldn't be possible to use drmm_universal_plane_alloc?
Maybe, but the *_init pattern allows these things to be inline in the struct as
they are now, and consistent with the other drm kernel objects in the
vkms_output struct. There are also a few other places we could use drmm,
surely, but to limit the scope/risk why don't we do that as a followup?
---
Marius,
Yeah those values could safely be completely removed. Good catch :)
next prev parent reply other threads:[~2023-08-18 3:37 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-23 22:23 [PATCH v2 0/6] Adds support for ConfigFS to VKMS! Jim Shargo
2023-06-23 22:23 ` [PATCH v2 1/6] drm/vkms: Back VKMS with DRM memory management instead of static objects Jim Shargo
2023-06-25 17:40 ` Maira Canal
2023-06-23 22:23 ` [PATCH v2 2/6] drm/vkms: Support multiple DRM objects (crtcs, etc.) per VKMS device Jim Shargo
2023-06-25 17:57 ` Maira Canal
2023-08-15 11:29 ` Marius Vlad
2023-08-18 3:36 ` Brandon Pollack [this message]
2023-08-18 5:26 ` Brandon Ross Pollack
2023-06-23 22:23 ` [PATCH v2 3/6] drm/vkms: Provide platform data when creating VKMS devices Jim Shargo
2023-06-23 22:23 ` [PATCH v2 4/6] drm/vkms: Add ConfigFS scaffolding to VKMS Jim Shargo
2023-06-25 18:19 ` Maira Canal
2023-06-28 2:00 ` kernel test robot
2023-06-23 22:23 ` [PATCH v2 5/6] drm/vkms: Support enabling ConfigFS devices Jim Shargo
2023-08-15 14:01 ` Marius Vlad
2023-08-18 5:24 ` Brandon Ross Pollack
2023-08-18 6:54 ` Marius Vlad
2023-06-23 22:23 ` [PATCH v2 6/6] drm/vkms: Add a module param to enable/disable the default device Jim Shargo
2023-06-25 18:04 ` Maira Canal
2023-08-18 5:39 ` Brandon Ross Pollack
2023-08-08 2:42 ` Brandon Pollack
2023-08-08 2:42 ` [PATCH] Initial backport of vkms changes from 6.4, including jshargo and brpols configs changes Brandon Pollack
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=20230818033605.2910699-1-brpol@chromium.org \
--to=brpol@chromium.org \
--cc=corbet@lwn.net \
--cc=dri-devel@lists.freedesktop.org \
--cc=hamohammed.sa@gmail.com \
--cc=jshargo@chromium.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mairacanal@riseup.net \
--cc=marius.vlad@collabora.com \
--cc=melissa.srw@gmail.com \
--cc=mripard@kernel.org \
--cc=rodrigosiqueiramelo@gmail.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 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).