Re: [PATCH] drm/doc: describe PATH format for DP MST
On Tue, Oct 24, 2023 at 04:12:34PM +0300, Pekka Paalanen wrote: > On Tue, 24 Oct 2023 16:03:27 +0300 > Ville Syrjälä wrote: > > > On Tue, Oct 24, 2023 at 09:03:22AM +, Simon Ser wrote: > > > On Tuesday, October 24th, 2023 at 09:36, Pekka Paalanen > > > wrote: > > > > > > > Are DP MST port numbers guaranteed to be tied to the physical hardware > > > > configuration (e.g. how cables are connected) and therefore stable > > > > across reboots? What about stable across kernel upgrades? > > > > > > > > If I knew that, I could perhaps manufacture a stable identifier in > > > > userspace by replacing the parent connector ID with a stable connector > > > > designator. > > > > > > Hm, my assumption is that these are stable, but maybe that's also wrong? > > > Ville, Dmitry, do you know whether the DP MST port numbers are > > > guaranteed stable across reboots when retaining the exact same hardware > > > configuration (not the software, maybe the user upgraded the kernel)? > > > > I suspect in practice those should remain the same as long as the > > topology didn't change, but I don't think there's anything in the > > DP spec that actually guarantees that (eg. some branch device > > could in theory reshuffle its port numbers on a whim). > > > > But there is no stable identifier for the corresponding SST > > connector anyway so I don't know what you would even do with > > stable port numbers. > > You mean the index in the array of connectors exposed to userspace is > not stable either for the root DP connector? It just depends on the order the driver probes the outputs, which could change when the code changes (or perhaps even across reboots with the same kernel due to randomness in deferred probe?). > > KMS device bus path + connector array index for hardwired connectors is > what I've been imagining as stable enough for all end users. I once posted a patch to add a path property to all connector which could give you a more stable identifier. But IIRC the discussion didn't really end in any kind of useful conclusion. Seems to be this one: https://lore.kernel.org/all/20190613184335.7970-1-ville.syrj...@linux.intel.com/ -- Ville Syrjälä Intel
Re: Wayland Governance Meeting - Oct 30 / Nov 01
Hi Pekka, (this time on list) On Fri, Oct 20, 2023 at 12:44 PM Pekka Paalanen wrote: > > On Thu, 19 Oct 2023 23:58:18 +0200 > Carlos Garnacho wrote: > > > Hi, > > > > I would like to propose a meeting about the color management protocol > > [1] after next week (it's late to schedule for next, plus there's > > people still likely at XDC). After talking with GIMP maintainers, I > > think this topic might welcome some higher bandwidth place to discuss. > > The doodle is at [2] to poll for the best day/time, the final date > > will be announced by Wednesday 25th. > > > > The meeting will be held at GNOME servers [3], anyone is free to join > > to listen if they want to, anonymously or not. > > > > The notes for this meeting, along with the ones from the previous meetings > > can > > be found on the wayland-protocols wiki page [4]. > > > > Cheers, > > Carlos > > > > [1] > > https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/14 > > [2] https://nuudel.digitalcourage.de/QYCvHEj5KR4HADfD > > Hi, > > what's the timezone of the proposed times? > > Europe will switch away from DST on Oct 29, so right before the > proposed times. Oops. I was implicitly assuming the central european time in place, CET shall be it for those dates :) Cheers, Carlos
Re: [PATCH] drm/doc: describe PATH format for DP MST
On Tue, 24 Oct 2023 16:03:27 +0300 Ville Syrjälä wrote: > On Tue, Oct 24, 2023 at 09:03:22AM +, Simon Ser wrote: > > On Tuesday, October 24th, 2023 at 09:36, Pekka Paalanen > > wrote: > > > > > Are DP MST port numbers guaranteed to be tied to the physical hardware > > > configuration (e.g. how cables are connected) and therefore stable > > > across reboots? What about stable across kernel upgrades? > > > > > > If I knew that, I could perhaps manufacture a stable identifier in > > > userspace by replacing the parent connector ID with a stable connector > > > designator. > > > > Hm, my assumption is that these are stable, but maybe that's also wrong? > > Ville, Dmitry, do you know whether the DP MST port numbers are > > guaranteed stable across reboots when retaining the exact same hardware > > configuration (not the software, maybe the user upgraded the kernel)? > > I suspect in practice those should remain the same as long as the > topology didn't change, but I don't think there's anything in the > DP spec that actually guarantees that (eg. some branch device > could in theory reshuffle its port numbers on a whim). > > But there is no stable identifier for the corresponding SST > connector anyway so I don't know what you would even do with > stable port numbers. You mean the index in the array of connectors exposed to userspace is not stable either for the root DP connector? KMS device bus path + connector array index for hardwired connectors is what I've been imagining as stable enough for all end users. Thanks, pq pgpypcPKhkGgP.pgp Description: OpenPGP digital signature
Re: [PATCH] drm/doc: describe PATH format for DP MST
On Tue, Oct 24, 2023 at 09:03:22AM +, Simon Ser wrote: > On Tuesday, October 24th, 2023 at 09:36, Pekka Paalanen > wrote: > > > Are DP MST port numbers guaranteed to be tied to the physical hardware > > configuration (e.g. how cables are connected) and therefore stable > > across reboots? What about stable across kernel upgrades? > > > > If I knew that, I could perhaps manufacture a stable identifier in > > userspace by replacing the parent connector ID with a stable connector > > designator. > > Hm, my assumption is that these are stable, but maybe that's also wrong? > Ville, Dmitry, do you know whether the DP MST port numbers are > guaranteed stable across reboots when retaining the exact same hardware > configuration (not the software, maybe the user upgraded the kernel)? I suspect in practice those should remain the same as long as the topology didn't change, but I don't think there's anything in the DP spec that actually guarantees that (eg. some branch device could in theory reshuffle its port numbers on a whim). But there is no stable identifier for the corresponding SST connector anyway so I don't know what you would even do with stable port numbers. -- Ville Syrjälä Intel
Re: [PATCH] drm/doc: describe PATH format for DP MST
On Tuesday, October 24th, 2023 at 09:36, Pekka Paalanen wrote: > Are DP MST port numbers guaranteed to be tied to the physical hardware > configuration (e.g. how cables are connected) and therefore stable > across reboots? What about stable across kernel upgrades? > > If I knew that, I could perhaps manufacture a stable identifier in > userspace by replacing the parent connector ID with a stable connector > designator. Hm, my assumption is that these are stable, but maybe that's also wrong? Ville, Dmitry, do you know whether the DP MST port numbers are guaranteed stable across reboots when retaining the exact same hardware configuration (not the software, maybe the user upgraded the kernel)?
Re: [RFC PATCH v2 04/17] drm/vkms: Add kunit tests for VKMS LUT handling
On 19/10/23 18:21, Harry Wentland wrote: > Debugging LUT math is much easier when we can unit test > it. Add kunit functionality to VKMS and add tests for > - get_lut_index > - lerp_u16 > > Signed-off-by: Harry Wentland > Cc: Ville Syrjala > Cc: Pekka Paalanen > Cc: Simon Ser > Cc: Harry Wentland > Cc: Melissa Wen > Cc: Jonas Ådahl > Cc: Sebastian Wick > Cc: Shashank Sharma > Cc: Alexander Goins > Cc: Joshua Ashton > Cc: Michel Dänzer > Cc: Aleix Pol > Cc: Xaver Hugl > Cc: Victoria Brekenfeld > Cc: Sima > Cc: Uma Shankar > Cc: Naseer Ahmed > Cc: Christopher Braga > Cc: Abhinav Kumar > Cc: Arthur Grillo > Cc: Hector Martin > Cc: Liviu Dudau > Cc: Sasha McIntosh > --- > drivers/gpu/drm/vkms/Kconfig | 5 ++ > drivers/gpu/drm/vkms/Makefile | 2 + > drivers/gpu/drm/vkms/tests/.kunitconfig | 4 ++ > drivers/gpu/drm/vkms/tests/Makefile | 4 ++ > drivers/gpu/drm/vkms/tests/vkms_color_tests.c | 64 +++ > drivers/gpu/drm/vkms/vkms_composer.c | 4 +- > drivers/gpu/drm/vkms/vkms_composer.h | 11 > 7 files changed, 92 insertions(+), 2 deletions(-) > create mode 100644 drivers/gpu/drm/vkms/tests/.kunitconfig > create mode 100644 drivers/gpu/drm/vkms/tests/Makefile > create mode 100644 drivers/gpu/drm/vkms/tests/vkms_color_tests.c > create mode 100644 drivers/gpu/drm/vkms/vkms_composer.h > > diff --git a/drivers/gpu/drm/vkms/Kconfig b/drivers/gpu/drm/vkms/Kconfig > index 1816562381a2..372cc5fa92f1 100644 > --- a/drivers/gpu/drm/vkms/Kconfig > +++ b/drivers/gpu/drm/vkms/Kconfig > @@ -13,3 +13,8 @@ config DRM_VKMS > a VKMS. > > If M is selected the module will be called vkms. > + > +config DRM_VKMS_KUNIT_TESTS > + tristate "Tests for VKMS" if !KUNIT_ALL_TESTS > + depends on DRM_VKMS && KUNIT > + default KUNIT_ALL_TESTS > diff --git a/drivers/gpu/drm/vkms/Makefile b/drivers/gpu/drm/vkms/Makefile > index 1b28a6a32948..d3440f228f46 100644 > --- a/drivers/gpu/drm/vkms/Makefile > +++ b/drivers/gpu/drm/vkms/Makefile > @@ -9,3 +9,5 @@ vkms-y := \ > vkms_writeback.o > > obj-$(CONFIG_DRM_VKMS) += vkms.o > + > +obj-y += tests/ > \ No newline at end of file > diff --git a/drivers/gpu/drm/vkms/tests/.kunitconfig > b/drivers/gpu/drm/vkms/tests/.kunitconfig > new file mode 100644 > index ..70e378228cbd > --- /dev/null > +++ b/drivers/gpu/drm/vkms/tests/.kunitconfig > @@ -0,0 +1,4 @@ > +CONFIG_KUNIT=y > +CONFIG_DRM=y > +CONFIG_DRM_VKMS=y > +CONFIG_DRM_VKMS_KUNIT_TESTS=y > diff --git a/drivers/gpu/drm/vkms/tests/Makefile > b/drivers/gpu/drm/vkms/tests/Makefile > new file mode 100644 > index ..761465332ff2 > --- /dev/null > +++ b/drivers/gpu/drm/vkms/tests/Makefile > @@ -0,0 +1,4 @@ > +# SPDX-License-Identifier: GPL-2.0+ > + > +obj-$(CONFIG_DRM_VKMS_KUNIT_TESTS) += \ > + vkms_color_tests.o > \ No newline at end of file > diff --git a/drivers/gpu/drm/vkms/tests/vkms_color_tests.c > b/drivers/gpu/drm/vkms/tests/vkms_color_tests.c > new file mode 100644 > index ..843b2e1d607e > --- /dev/null > +++ b/drivers/gpu/drm/vkms/tests/vkms_color_tests.c > @@ -0,0 +1,64 @@ > +/* SPDX-License-Identifier: GPL-2.0+ */ > + > +#include > + > +#include > + > +#include "../vkms_composer.h" > + > +#define TEST_LUT_SIZE 16 > + > +static struct drm_color_lut test_linear_array[TEST_LUT_SIZE] = { > + { 0x0, 0x0, 0x0, 0 }, > + { 0x, 0x, 0x, 0 }, > + { 0x, 0x, 0x, 0 }, > + { 0x, 0x, 0x, 0 }, > + { 0x, 0x, 0x, 0 }, > + { 0x, 0x, 0x, 0 }, > + { 0x, 0x, 0x, 0 }, > + { 0x, 0x, 0x, 0 }, > + { 0x, 0x, 0x, 0 }, > + { 0x, 0x, 0x, 0 }, > + { 0x, 0x, 0x, 0 }, > + { 0x, 0x, 0x, 0 }, > + { 0x, 0x, 0x, 0 }, > + { 0x, 0x, 0x, 0 }, > + { 0x, 0x, 0x, 0 }, > + { 0x, 0x, 0x, 0 }, > +}; > + > +const struct vkms_color_lut test_linear_lut = { > + .base = test_linear_array, > + .lut_length = TEST_LUT_SIZE, > + .channel_value2index_ratio = 0xf000fll > +}; > + > + > +static void vkms_color_test_get_lut_index(struct kunit *test) > +{ > + int i; > + > + KUNIT_EXPECT_EQ(test, drm_fixp2int(get_lut_index(_linear_lut, > test_linear_array[0].red)), 0); > + > + for (i = 0; i < TEST_LUT_SIZE; i++) > + KUNIT_EXPECT_EQ(test, > drm_fixp2int_ceil(get_lut_index(_linear_lut, test_linear_array[i].red)), > i); > +} > + > +static void vkms_color_test_lerp(struct kunit *test) > +{ > + KUNIT_EXPECT_EQ(test, lerp_u16(0x0, 0x10, 0x8000), 0x8); > +} > + > +static struct kunit_case vkms_color_test_cases[] = { > + KUNIT_CASE(vkms_color_test_get_lut_index), > + KUNIT_CASE(vkms_color_test_lerp), > + {} > +}; > + > +static struct kunit_suite vkms_color_test_suite = { > + .name = "vkms-color", > +
Re: [PATCH] drm/doc: describe PATH format for DP MST
On Mon, 23 Oct 2023 20:36:39 + Simon Ser wrote: > This is already uAPI, xserver parses it. It's useful to document > since user-space might want to lookup the parent connector. > > Additionally, people (me included) have misunderstood the PATH > property for being stable across reboots, but since a KMS object > ID is baked in there that's not the case. So PATH shouldn't be > used as-is in config files and such. > > Signed-off-by: Simon Ser > Cc: Pekka Paalanen > Cc: Dmitry Baryshkov > Cc: Daniel Vetter > --- > drivers/gpu/drm/drm_connector.c | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c > index c3725086f413..392bec1355a3 100644 > --- a/drivers/gpu/drm/drm_connector.c > +++ b/drivers/gpu/drm/drm_connector.c > @@ -1198,6 +1198,11 @@ static const u32 dp_colorspaces = > * drm_connector_set_path_property(), in the case of DP MST with the > * path property the MST manager created. Userspace cannot change this > * property. > + * > + * In the case of DP MST, the property has the format > + * ``mst:-`` where is the KMS object ID of the > + * parent connector and is a hyphen-separated list of DP MST > + * port numbers. Note, KMS object IDs are not stable across reboots. > * TILE: > * Connector tile group property to indicate how a set of DRM connector > * compose together into one logical screen. This is used by both high-res Acked-by: Pekka Paalanen with or without the suggested "guaranteed" wording. Are DP MST port numbers guaranteed to be tied to the physical hardware configuration (e.g. how cables are connected) and therefore stable across reboots? What about stable across kernel upgrades? If I knew that, I could perhaps manufacture a stable identifier in userspace by replacing the parent connector ID with a stable connector designator. Thanks, pq pgpVBJn8Yyapi.pgp Description: OpenPGP digital signature