From: Matti Vaittinen <mazziesaccount@gmail.com>
To: Maxime Ripard <maxime@cerno.tech>
Cc: "Heikki Krogerus" <heikki.krogerus@linux.intel.com>,
"Emma Anholt" <emma@anholt.net>,
"Rafael J. Wysocki" <rafael@kernel.org>,
"Stephen Boyd" <sboyd@kernel.org>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Maíra Canal" <mcanal@igalia.com>,
"Javier Martinez Canillas" <javierm@redhat.com>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
"Noralf Trønnes" <noralf@tronnes.org>,
"Matti Vaittinen" <matti.vaittinen@fi.rohmeurope.com>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>
Subject: Re: [PATCH v4 2/8] kunit: drm/tests: move generic helpers
Date: Sun, 19 Mar 2023 08:36:20 +0200 [thread overview]
Message-ID: <e8f50fe8-bad3-e59e-4d80-e2f7db9c9933@gmail.com> (raw)
In-Reply-To: <20230317150916.a3xrh25ywe5k77yp@houat>
Hi Maxime & All
First of all - I am sorry. During the last minute rebase I accidentally
dropped the header file from this series. Will fix that for v5. (Also
the build bot pointed this mistake).
On 3/17/23 17:09, Maxime Ripard wrote:
> Hi Matti,
>
> On Fri, Mar 17, 2023 at 04:42:25PM +0200, Matti Vaittinen wrote:
>> The creation of a dummy device in order to test managed interfaces is a
>> generally useful test feature. The drm test helpers
>> test_kunit_helper_alloc_device() and test_kunit_helper_free_device()
>> are doing exactly this. It makes no sense that each and every component
>> which intends to be testing managed interfaces will create similar
>> helpers.
>>
>> Move these functions to place where it is more obvious they can be used
>> also by other subsystems but drm.
>>
>> Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
>>
>> ---
>>
>> Please note that there's something similat ongoing in the CCF:
>> https://lore.kernel.org/all/20230302013822.1808711-1-sboyd@kernel.org/
>>
>> I do like the simplicity of these DRM-originated helpers so I think
>> they're worth. I do equally like the Stephen's idea of having the
>> "dummy platform device" related helpers under drivers/base and the
>> header being in include/kunit/platform_device.h which is similar to real
>> platform device under include/linux/platform_device.h - so, in the end
>> of the day I hope Stephen's changes as well as the changes this patch
>> introduces to end up in those files. This, however, will require some
>> co-operation to avoid conflicts.
>
> I think you would have an easier time if you just copied and renamed
> them into the kunit folder as an preparation series.
Yes. That would simplify the syncing between the trees. It slightly bugs
me to add dublicate code in kernel-but the clean-up series for DRM users
could be prepared at the same time. It would be even possible to just
change the drm-helper to be a wrapper for the generic one - and leave
the callers intact - although it leaves some seemingly unnecessary
"onion code" there.
> That way, you wouldn't have to coordinate DRM, CCF and IIO, you'd just
> create new helpers that can be reused/converted to by everyone eventually
Yes. Thanks - I think I may go with this approach for the v5 :)
Yours,
-- Matti
--
Matti Vaittinen
Linux kernel developer at ROHM Semiconductors
Oulu Finland
~~ When things go utterly wrong vim users can always type :help! ~~
WARNING: multiple messages have this Message-ID (diff)
From: Matti Vaittinen <mazziesaccount@gmail.com>
To: Maxime Ripard <maxime@cerno.tech>
Cc: "Matti Vaittinen" <matti.vaittinen@fi.rohmeurope.com>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
"David Airlie" <airlied@gmail.com>,
"Daniel Vetter" <daniel@ffwll.ch>,
"Emma Anholt" <emma@anholt.net>,
"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
"Heikki Krogerus" <heikki.krogerus@linux.intel.com>,
"Maíra Canal" <mcanal@igalia.com>,
"Javier Martinez Canillas" <javierm@redhat.com>,
"Noralf Trønnes" <noralf@tronnes.org>,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
"Stephen Boyd" <sboyd@kernel.org>
Subject: Re: [PATCH v4 2/8] kunit: drm/tests: move generic helpers
Date: Sun, 19 Mar 2023 08:36:20 +0200 [thread overview]
Message-ID: <e8f50fe8-bad3-e59e-4d80-e2f7db9c9933@gmail.com> (raw)
In-Reply-To: <20230317150916.a3xrh25ywe5k77yp@houat>
Hi Maxime & All
First of all - I am sorry. During the last minute rebase I accidentally
dropped the header file from this series. Will fix that for v5. (Also
the build bot pointed this mistake).
On 3/17/23 17:09, Maxime Ripard wrote:
> Hi Matti,
>
> On Fri, Mar 17, 2023 at 04:42:25PM +0200, Matti Vaittinen wrote:
>> The creation of a dummy device in order to test managed interfaces is a
>> generally useful test feature. The drm test helpers
>> test_kunit_helper_alloc_device() and test_kunit_helper_free_device()
>> are doing exactly this. It makes no sense that each and every component
>> which intends to be testing managed interfaces will create similar
>> helpers.
>>
>> Move these functions to place where it is more obvious they can be used
>> also by other subsystems but drm.
>>
>> Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
>>
>> ---
>>
>> Please note that there's something similat ongoing in the CCF:
>> https://lore.kernel.org/all/20230302013822.1808711-1-sboyd@kernel.org/
>>
>> I do like the simplicity of these DRM-originated helpers so I think
>> they're worth. I do equally like the Stephen's idea of having the
>> "dummy platform device" related helpers under drivers/base and the
>> header being in include/kunit/platform_device.h which is similar to real
>> platform device under include/linux/platform_device.h - so, in the end
>> of the day I hope Stephen's changes as well as the changes this patch
>> introduces to end up in those files. This, however, will require some
>> co-operation to avoid conflicts.
>
> I think you would have an easier time if you just copied and renamed
> them into the kunit folder as an preparation series.
Yes. That would simplify the syncing between the trees. It slightly bugs
me to add dublicate code in kernel-but the clean-up series for DRM users
could be prepared at the same time. It would be even possible to just
change the drm-helper to be a wrapper for the generic one - and leave
the callers intact - although it leaves some seemingly unnecessary
"onion code" there.
> That way, you wouldn't have to coordinate DRM, CCF and IIO, you'd just
> create new helpers that can be reused/converted to by everyone eventually
Yes. Thanks - I think I may go with this approach for the v5 :)
Yours,
-- Matti
--
Matti Vaittinen
Linux kernel developer at ROHM Semiconductors
Oulu Finland
~~ When things go utterly wrong vim users can always type :help! ~~
next prev parent reply other threads:[~2023-03-19 6:36 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-17 14:40 [PATCH v4 0/8] Support ROHM BU27034 ALS sensor Matti Vaittinen
2023-03-17 14:40 ` Matti Vaittinen
2023-03-17 14:41 ` [PATCH v4 1/8] drm/tests: helpers: rename generic helpers Matti Vaittinen
2023-03-17 14:41 ` Matti Vaittinen
2023-03-17 14:42 ` [PATCH v4 2/8] kunit: drm/tests: move " Matti Vaittinen
2023-03-17 14:42 ` Matti Vaittinen
2023-03-17 15:09 ` Maxime Ripard
2023-03-17 15:09 ` Maxime Ripard
2023-03-19 6:36 ` Matti Vaittinen [this message]
2023-03-19 6:36 ` Matti Vaittinen
2023-03-20 19:23 ` Stephen Boyd
2023-03-21 5:45 ` Matti Vaittinen
2023-03-21 5:45 ` Matti Vaittinen
2023-03-21 18:59 ` Stephen Boyd
2023-03-22 6:16 ` Vaittinen, Matti
2023-03-22 6:16 ` Vaittinen, Matti
2023-03-22 9:44 ` Andy Shevchenko
2023-03-22 9:44 ` Andy Shevchenko
2023-03-17 14:42 ` [PATCH v4 3/8] dt-bindings: iio: light: Support ROHM BU27034 Matti Vaittinen
2023-03-17 14:43 ` [PATCH v4 4/8] iio: light: Add gain-time-scale helpers Matti Vaittinen
2023-03-19 18:08 ` Jonathan Cameron
2023-03-20 12:01 ` Matti Vaittinen
2023-03-22 9:10 ` Matti Vaittinen
2023-03-25 18:29 ` Jonathan Cameron
2023-03-27 6:47 ` Vaittinen, Matti
2023-03-17 14:43 ` [PATCH v4 5/8] iio: test: test " Matti Vaittinen
2023-03-17 17:16 ` kernel test robot
2023-03-19 18:18 ` Jonathan Cameron
2023-03-17 14:44 ` [PATCH v4 6/8] MAINTAINERS: Add IIO " Matti Vaittinen
2023-03-17 14:44 ` [PATCH v4 7/8] iio: light: ROHM BU27034 Ambient Light Sensor Matti Vaittinen
2023-03-17 14:48 ` Matti Vaittinen
2023-03-19 18:29 ` Jonathan Cameron
2023-03-17 14:45 ` [PATCH v4 8/8] MAINTAINERS: Add ROHM BU27034 Matti Vaittinen
2023-03-19 16:57 ` [PATCH v4 0/8] Support ROHM BU27034 ALS sensor Jonathan Cameron
2023-03-19 16:57 ` Jonathan Cameron
2023-03-20 10:10 ` Matti Vaittinen
2023-03-20 10:10 ` Matti Vaittinen
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=e8f50fe8-bad3-e59e-4d80-e2f7db9c9933@gmail.com \
--to=mazziesaccount@gmail.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=emma@anholt.net \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=javierm@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=matti.vaittinen@fi.rohmeurope.com \
--cc=maxime@cerno.tech \
--cc=mcanal@igalia.com \
--cc=noralf@tronnes.org \
--cc=rafael@kernel.org \
--cc=sboyd@kernel.org \
--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.