ev, nv_connector->native_mode);
> + if (!mode)
> + return -ENOMEM;
Do not return negative values from .get_modes().
BR,
Jani.
> drm_mode_probed_add(connector, mode);
> ret = 1;
> }
--
Jani Nikula, Intel
lue of this member?
If you don't document it, people will find creative uses for this.
BR,
Jani.
> + bool async_flip;
> };
>
> #define obj_to_plane(x) container_of(x, struct drm_plane, base)
--
Jani Nikula, Intel
ing() isn't a great argument alone,
because this adds three times the number of __match_string() calls than
there are __sysfs_match_string() calls. It's not a good model to follow.
Arguably both should be renamed.
BR,
Jani.
--
Jani Nikula, Intel
On Thu, 23 May 2024, Sam Ravnborg wrote:
> Hi Jani,
>
> On Thu, May 23, 2024 at 06:51:09PM +0300, Jani Nikula wrote:
>> With the -Wformat-truncation warnings fixed, finish the job started in
>> commit a61ddb4393ad ("drm: enable (most) W=1 warnings by default across
>
On Thu, 23 May 2024, Alex Deucher wrote:
> Already fixed with this patch:
> https://patchwork.freedesktop.org/patch/594864/
Great, thanks!
BR,
Jani.
--
Jani Nikula, Intel
On Thu, 23 May 2024, Ville Syrjälä wrote:
> On Thu, May 23, 2024 at 06:51:08PM +0300, Jani Nikula wrote:
>> Enabling -Wformat-truncation yields the following warning:
>>
>> ../drivers/gpu/drm/imx/ipuv3/imx-ldb.c: In function ‘imx_ldb_probe’:
>> ../drivers/gpu/drm
With the -Wformat-truncation warnings fixed, finish the job started in
commit a61ddb4393ad ("drm: enable (most) W=1 warnings by default across
the subsystem"), and enable that warning too.
Signed-off-by: Jani Nikula
---
Gut feeling says there are more issues, and my configs just d
e 16
658 | snprintf(clkname, sizeof(clkname), "di%d_sel", i);
| ^
Silence the warning by checking the snprintf() return value.
Signed-off-by: Jani Nikula
---
Cc: Philipp Zabel
Cc: Shawn Guo
Cc: Sascha Ha
"nv_backlight%d", nb);
|
^~~~
Silence the warning by checking the snprintf() return value.
Signed-off-by: Jani Nikula
---
Cc: Karol Herbst
Cc: Lyude Paul
Cc: Danilo Krummrich
Cc: dri-de...@lists.freedesktop.org
Cc: nouveau@lists.freedesktop.org
---
drivers/gpu/drm/n
Silence the warning by checking the snprintf() return value.
Signed-off-by: Jani Nikula
---
Cc: Alex Deucher
Cc: "Christian König"
Cc: Pan Xinhui
Cc: amd-...@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
---
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.
Jani Nikula (4):
drm/amdgpu: fix -Wformat-truncation warning in
amdgpu_gfx_kiq_init_ring()
drm/nouveau: fix -Wformat-truncation warning in
nouveau_backlight_init()
drm/imx: fix -Wformat-truncation warning in imx_ldb_probe()
drm: enable -Wformat-truncation across the subsystem
On Mon, 13 May 2024, Alex Deucher wrote:
> On Mon, May 13, 2024 at 8:20 AM Jani Nikula wrote:
>>
>> On Fri, 10 May 2024, Alex Deucher wrote:
>> > On Fri, May 10, 2024 at 11:17 AM Jani Nikula wrote:
>> > Series is:
>> > Acked-by: Alex Deucher
>>
On Fri, 10 May 2024, Alex Deucher wrote:
> On Fri, May 10, 2024 at 11:17 AM Jani Nikula wrote:
>>
>> I've sent this some moths ago, let's try again...
>>
>> BR,
>> Jani.
>>
>> Jani Nikula (6):
>> drm/nouveau: convert to using is_hdmi and h
On Fri, 10 May 2024, Lyude Paul wrote:
> Reviewed-by: Lyude Paul
Thanks, how do you want to handle merging this?
BR,
Jani.
>
> On Fri, 2024-05-10 at 18:08 +0300, Jani Nikula wrote:
>> Prefer the parsed results for is_hdmi and has_audio in display info
>
Accessing the EDID via edid_blob_ptr causes chicken-and-egg
problems. Keep edid_blob_ptr as the userspace interface that should be
accessed via dedicated functions.
Signed-off-by: Jani Nikula
---
include/drm/drm_connector.h | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git
Add a helper to get the EDID property for sysfs property show. This
hides all the edid_blob_ptr usage within drm_edid.c.
Signed-off-by: Jani Nikula
---
drivers/gpu/drm/drm_crtc_internal.h | 2 ++
drivers/gpu/drm/drm_edid.c | 33 +
drivers/gpu/drm
ing it.
Cc: Alex Deucher
Cc: Christian König
Cc: Pan, Xinhui
Cc: amd-...@lists.freedesktop.org
Signed-off-by: Jani Nikula
---
drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c | 16
drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.h | 1 -
drivers/gpu/drm/amd/amdgpu/dce_v10_
ing it.
Cc: Alex Deucher
Cc: Christian König
Cc: Pan, Xinhui
Cc: amd-...@lists.freedesktop.org
Signed-off-by: Jani Nikula
---
drivers/gpu/drm/radeon/radeon_audio.c | 7 ---
drivers/gpu/drm/radeon/radeon_connectors.c | 15 ---
drivers/gpu/drm/radeon/radeon_mode.h |
Prefer the parsed results for is_hdmi and has_audio in display info over
calling drm_detect_hdmi_monitor() and drm_detect_monitor_audio(),
respectively.
Cc: Alex Deucher
Cc: Christian König
Cc: Pan, Xinhui
Cc: amd-...@lists.freedesktop.org
Signed-off-by: Jani Nikula
---
drivers/gpu/drm
Cc: Danilo Krummrich
Cc: nouveau@lists.freedesktop.org
Signed-off-by: Jani Nikula
---
drivers/gpu/drm/nouveau/dispnv50/disp.c | 8
drivers/gpu/drm/nouveau/dispnv50/head.c | 8 +---
drivers/gpu/drm/nouveau/nouveau_connector.c | 2 +-
3 files changed, 6 insertions(+), 12
I've sent this some moths ago, let's try again...
BR,
Jani.
Jani Nikula (6):
drm/nouveau: convert to using is_hdmi and has_audio from display info
drm/radeon: convert to using is_hdmi and has_audio from display info
drm/radeon: remove radeon_connector_edid() and stop using
; main drivers/i2c accepting the new terminology. So we don't have a
>> > risk of that getting push back and new names there and we having
>> > to rename it once again.
>>
>> Just to be explicit, did you want me to remove the Acked-by in v3, or will
>> yo
On Mon, 22 Apr 2024, Jani Nikula wrote:
> Surprisingly many places depend on debugfs.h to be included via
> drm_print.h. Fix them.
>
> v3: Also fix armada, ite-it6505, imagination, msm, sti, vc4, and xe
>
> v2: Also fix ivpu and vmwgfx
>
> Reviewed-by: Andrzej Hajda
&
On Thu, 18 Apr 2024, Jani Nikula wrote:
> On Thu, 18 Apr 2024, Robert Foss wrote:
>> I'm seeing build errors for drivers/gpu/drm/bridge/ite-it6505.c, is
>> this expected?
>
> No, but it's possible my configs didn't catch all configs. :(
Okay, enabled a bunch more arm/arm6
/20240410141434.157908-1-jani.nik...@intel.com
Signed-off-by: Jani Nikula
---
Cc: Jacek Lawrynowicz
Cc: Stanislaw Gruszka
Cc: Oded Gabbay
Cc: Russell King
Cc: David Airlie
Cc: Daniel Vetter
Cc: Andrzej Hajda
Cc: Neil Armstrong
Cc: Robert Foss
Cc: Laurent Pinchart
Cc: Jonas Karlman
Cc: Jernej
On Thu, 18 Apr 2024, Robert Foss wrote:
> I'm seeing build errors for drivers/gpu/drm/bridge/ite-it6505.c, is
> this expected?
No, but it's possible my configs didn't catch all configs. :(
BR,
Jani.
--
Jani Nikula, Intel
Surprisingly many places depend on debugfs.h to be included via
drm_print.h. Fix them.
v2: Also fix ivpu and vmwgfx
Reviewed-by: Andrzej Hajda
Acked-by: Maxime Ripard
Link:
https://patchwork.freedesktop.org/patch/msgid/20240410141434.157908-1-jani.nik...@intel.com
Signed-off-by: Jani Nikula
On Wed, 10 Apr 2024, Jani Nikula wrote:
> Surprisingly many places depend on debugfs.h to be included via
> drm_print.h. Fix them.
While all of this is trivial, merely adding some includes, please
consider acking the changes to your corner of the kernel.
Thanks,
Jani.
>
> Signed-
Surprisingly many places depend on debugfs.h to be included via
drm_print.h. Fix them.
Signed-off-by: Jani Nikula
---
Cc: Andrzej Hajda
Cc: Neil Armstrong
Cc: Robert Foss
Cc: Laurent Pinchart
Cc: Jonas Karlman
Cc: Jernej Skrabec
Cc: Maarten Lankhorst
Cc: Maxime Ripard
Cc: Thomas
On Tue, 02 Apr 2024, Easwar Hariharan wrote:
> On 4/2/2024 7:32 AM, Jani Nikula wrote:
>> On Tue, 02 Apr 2024, Easwar Hariharan wrote:
>>> On 4/2/2024 12:48 AM, Jani Nikula wrote:
>>>> On Fri, 29 Mar 2024, Easwar Hariharan wrote:
>>>>> I2C v7, SM
On Tue, 02 Apr 2024, Easwar Hariharan wrote:
> On 4/2/2024 12:48 AM, Jani Nikula wrote:
>> On Fri, 29 Mar 2024, Easwar Hariharan wrote:
>>> I2C v7, SMBus 3.2, and I3C specifications have replaced "master/slave"
>>> with more appropriate terms. Inspired by and
On Fri, 29 Mar 2024, Easwar Hariharan wrote:
> I2C v7, SMBus 3.2, and I3C specifications have replaced "master/slave"
> with more appropriate terms. Inspired by and following on to Wolfram's
> series to fix drivers/i2c/[1], fix the terminology for users of
> I2C_ALGOBIT bitbanging interface, now
On Tue, 05 Mar 2024, duom...@zju.edu.cn wrote:
> On Mon, 04 Mar 2024 14:14:52 +0200 Jani Nikula wrote:
>> >> The kcalloc() in nouveau_dmem_evict_chunk() will return null if
>> >> the physical memory has run out. As a result, if we dereference
>> >> src_pfns,
in
a warning due to -Wvla. See 0bb95f80a38f ("Makefile: Globally enable VLA
warning").
Error checking and propagation is the way to go.
BR,
Jani.
--
Jani Nikula, Intel
Miao
>> >*/
>> > +#include
>> > #include
>> > #include
>> > #include
>>
>> --
>> --
>> Thomas Zimmermann
>> Graphics Driver Developer
>> SUSE Software Solutions Germany GmbH
>> Frankenstrasse 146, 90461 Nuernberg, Germany
>> GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
>> HRB 36809 (AG Nuernberg)
>>
--
Jani Nikula, Intel
->acpi_edid_allowed)
>
> That should probably be called 'prefer_acpi_edid' or something
> since it's the first choice when the flag is set.
>
> But I'm not so sure there's any real benefit in having this
> flag at all. You anyway have to modify the driver to use this,
> so why not just have the driver do the call directly instead of
> adding this extra detour via the flag?
Heh, round and round we go [1].
BR,
Jani.
[1] https://lore.kernel.org/r/87sf23auxv@intel.com
--
Jani Nikula, Intel
2 @@ struct drm_connector {
>
> /** @hdr_sink_metadata: HDR Metadata Information read from sink */
> struct hdr_sink_metadata hdr_sink_metadata;
> +
> + /**
> + * @acpi_edid_allowed: Get the EDID from the BIOS, if available.
> + * This is only applicable to eDP and LVDS displays.
> + */
> + bool acpi_edid_allowed;
> };
>
> #define obj_to_connector(x) container_of(x, struct drm_connector, base)
> diff --git a/include/drm/drm_edid.h b/include/drm/drm_edid.h
> index 7923bc00dc7a..1c1ee927de9c 100644
> --- a/include/drm/drm_edid.h
> +++ b/include/drm/drm_edid.h
> @@ -459,5 +459,6 @@ bool drm_edid_is_digital(const struct drm_edid *drm_edid);
>
> const u8 *drm_find_edid_extension(const struct drm_edid *drm_edid,
> int ext_id, int *ext_index);
> +const struct drm_edid *drm_edid_read_acpi(struct drm_connector *connector);
>
> #endif /* __DRM_EDID_H__ */
--
Jani Nikula, Intel
which needs backlight.h in
> one of its source files.
On the series,
Reviewed-by: Jani Nikula
> Thomas Zimmermann (7):
> drm/nouveau: Include
> fbdev: Do not include in header
> fbdev: Do not include in header
> fbdev: Do not include in header
> fbdev: Do
On Wed, 31 Jan 2024, Danilo Krummrich wrote:
> On 1/10/24 18:39, Jani Nikula wrote:
>> Fix the W=1 warning -Wunused-but-set-variable.
>>
>> Cc: Karol Herbst
>> Cc: Lyude Paul
>> Cc: Danilo Krummrich
>> Cc: nouveau@lists.freedesktop.org
>> Signed
On Wed, 31 Jan 2024, Danilo Krummrich wrote:
> On 1/10/24 18:39, Jani Nikula wrote:
>> Fix the W=1 warning -Wunused-but-set-variable.
>>
>> Cc: Karol Herbst
>> Cc: Lyude Paul
>> Cc: Danilo Krummrich
>> Cc: nouveau@lists.freedesktop.org
>> Signed
On Wed, 10 Jan 2024, Jani Nikula wrote:
> Fix the W=1 warning -Wunused-but-set-variable.
>
> Cc: Karol Herbst
> Cc: Lyude Paul
> Cc: Danilo Krummrich
> Cc: nouveau@lists.freedesktop.org
> Signed-off-by: Jani Nikula
Ping?
> ---
> drivers/gpu/drm/nouveau/nouveau
On Wed, 10 Jan 2024, Jani Nikula wrote:
> Fix the W=1 warning -Wunused-but-set-variable.
>
> Cc: Karol Herbst
> Cc: Lyude Paul
> Cc: Danilo Krummrich
> Cc: nouveau@lists.freedesktop.org
> Signed-off-by: Jani Nikula
Ping?
> ---
> drivers/gpu/drm/nouveau/nvkm/sub
Cc: Danilo Krummrich
Cc: nouveau@lists.freedesktop.org
Signed-off-by: Jani Nikula
---
drivers/gpu/drm/nouveau/dispnv50/disp.c | 8
drivers/gpu/drm/nouveau/dispnv50/head.c | 8 +---
drivers/gpu/drm/nouveau/nouveau_connector.c | 2 +-
3 files changed, 6 insertions(+), 12
On Sun, 14 Jan 2024, Ilia Mirkin wrote:
> On Fri, Jan 12, 2024 at 11:50 AM Jani Nikula wrote:
>>
>> Prefer the parsed results for is_hdmi and has_audio in display info over
>> calling drm_detect_hdmi_monitor() and drm_detect_monitor_audio(),
>> respectively.
>>
&
@lists.freedesktop.org
Signed-off-by: Jani Nikula
---
drivers/gpu/drm/nouveau/dispnv50/disp.c | 8
drivers/gpu/drm/nouveau/dispnv50/head.c | 8 +---
drivers/gpu/drm/nouveau/nouveau_connector.c | 2 +-
3 files changed, 6 insertions(+), 12 deletions(-)
diff --git a/drivers/gpu/drm/nouveau
Fix the W=1 warning -Wunused-but-set-variable.
Cc: Karol Herbst
Cc: Lyude Paul
Cc: Danilo Krummrich
Cc: nouveau@lists.freedesktop.org
Signed-off-by: Jani Nikula
---
drivers/gpu/drm/nouveau/nouveau_svm.c | 10 +++---
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/drivers
Fix the W=1 warning -Wunused-but-set-variable.
Cc: Karol Herbst
Cc: Lyude Paul
Cc: Danilo Krummrich
Cc: nouveau@lists.freedesktop.org
Signed-off-by: Jani Nikula
---
drivers/gpu/drm/nouveau/nvkm/subdev/acr/lsfw.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers
On Tue, 09 Jan 2024, Danilo Krummrich wrote:
> On 1/9/24 10:59, Jani Nikula wrote:
>> On Mon, 08 Jan 2024, Danilo Krummrich wrote:
>>> On 1/4/24 21:16, Jani Nikula wrote:
>>>> Including drm_edid.h from nouveau_connector.h causes the rebuild of 15
>>>>
; __u32 op_count;
>> /**
>> * @flags: the flags for a _nouveau_vm_bind ioctl
>> + *
>> + * Supported values:
>> + *
>> + * %DRM_NOUVEAU_VM_BIND_RUN_ASYNC - Indicates that the given VM_BIND
>> + * operation should be executed asynchronously by the kernel.
>> + *
>> + * If this flag is not supplied the kernel executes the associated
>> + * operations synchronously and doesn't accept any _nouveau_sync
>> + * objects.
>> */
>> __u32 flags;
>> -/**
>> - * @DRM_NOUVEAU_VM_BIND_RUN_ASYNC:
>> - *
>> - * Indicates that the given VM_BIND operation should be executed
>> asynchronously
>> - * by the kernel.
>> - *
>> - * If this flag is not supplied the kernel executes the associated
>> operations
>> - * synchronously and doesn't accept any _nouveau_sync objects.
>> - */
>> #define DRM_NOUVEAU_VM_BIND_RUN_ASYNC 0x1
>> /**
>> * @wait_count: the number of wait _nouveau_syncs
>
--
Jani Nikula, Intel
On Mon, 08 Jan 2024, Danilo Krummrich wrote:
> On 1/4/24 21:16, Jani Nikula wrote:
>> Including drm_edid.h from nouveau_connector.h causes the rebuild of 15
>> files when drm_edid.h is modified, while there are only a few files that
>> actually need to include drm_edid.h.
&g
Including drm_edid.h from nouveau_connector.h causes the rebuild of 15
files when drm_edid.h is modified, while there are only a few files that
actually need to include drm_edid.h.
Cc: Karol Herbst
Cc: Lyude Paul
Cc: Danilo Krummrich
Cc: nouveau@lists.freedesktop.org
Signed-off-by: Jani Nikula
On Tue, 12 Dec 2023, Jani Nikula wrote:
> Including drm_edid.h from nouveau_connector.h causes the rebuild of 15
> files when drm_edid.h is modified, while there are only a few files that
> actually need to include drm_edid.h.
Ping?
>
> Signed-off-by: Jani Nikula
> ---
Including drm_edid.h from nouveau_connector.h causes the rebuild of 15
files when drm_edid.h is modified, while there are only a few files that
actually need to include drm_edid.h.
Signed-off-by: Jani Nikula
---
drivers/gpu/drm/nouveau/dispnv50/head.c | 1 +
drivers/gpu/drm/nouveau
t;vscan > 1) {
>> +if (unlikely(check_mul_overflow(den, mode->vscan, )))
>> +return 0;
>> +}
>
> I can't see any driver that actually supports vscan>1. Only
> nouveau has some code for it, but doesn't look like it does
> an
gh
I think only the latter is documented and recommended. It's also the
most popular:
10577 Return
3596 Returns
1104 RETURN
568 return
367 returns
352 RETURNS
1 RETURNs
BR,
Jani.
--
Jani Nikula, Intel
e. I believe that
> there always some people need do back-port and upstream work
> for various reasons.
While that may be true, it's not an argument in favour of adding new
module parameters or special values to existing module parameters. They
would have to be backported just as well.
BR,
Jani.
--
Jani
vers/gpu/drm/nouveau/nouveau_vga.c | 11 +++-
> drivers/gpu/drm/radeon/radeon_device.c| 10 +++-
> drivers/pci/vgaarb.c | 43 --
> drivers/vfio/pci/vfio_pci_core.c | 2 +-
> include/linux/vgaarb.h| 8 ++-
> 14 files changed, 210 insertions(+), 19 deletions(-)
--
Jani Nikula, Intel Open Source Graphics Center
subsystem warning free?
BR,
Jani.
--
Jani Nikula, Intel Open Source Graphics Center
_device *. As shown by the numbers above.
If folks insist on following through with this anyway, I'm firmly in the
camp the name should be "drm" and nothing else.
BR,
Jani.
--
Jani Nikula, Intel Open Source Graphics Center
On Wed, 12 Jul 2023, Uwe Kleine-König wrote:
> Hello Jani,
>
> On Wed, Jul 12, 2023 at 05:34:28PM +0300, Jani Nikula wrote:
>> On Wed, 12 Jul 2023, Uwe Kleine-König wrote:
>> > Hello,
>> >
>> > while I debugged an issue in the imx-lcdc driver I
l merge all of the patches in this series (e.g. including
>> > > the patch for drm/amdgpu(7/8) and drm/radeon(8/8)) ?
>> > >
>> > > Or just part of them?
>
> The bulk of this series is drivers/pci changes, so typically I would
> merge all the patches after getti
ll/20230406203103.3011503-2-krzysztof.kozlow...@linaro.org/
>
> Therefore I propose this should also go via hwmon tree.
Thanks for doing this, I couldn't be bothered to follow through with it
[1].
Acked-by: Jani Nikula
[1] https://lore.kernel.org/r/20230309082841.400118-1-jani.nik...@intel.com
&g
@lists.freedesktop.org
Signed-off-by: Jani Nikula
---
drivers/gpu/drm/nouveau/dispnv50/disp.c | 8
drivers/gpu/drm/nouveau/dispnv50/head.c | 8 +---
drivers/gpu/drm/nouveau/nouveau_connector.c | 2 +-
3 files changed, 6 insertions(+), 12 deletions(-)
diff --git a/drivers/gpu/drm/nouveau
Jani Nikula (12):
drm/edid: parse display info has_audio similar to is_hdmi
drm/nouveau: convert to using is_hdmi and has_audio from display info
drm/radeon: convert to using is_hdmi and has_audio from display info
drm/radeon: remove radeon_connector_edid() and stop using
edid_blob_ptr
this. Personally I
think it's enough to build test and fix any fallout afterwards.
To that end, I did build test this myself with my config, and it was
fine, though that probably doesn't add much coverage.
FWIW,
Acked-by: Jani Nikula
--
Jani Nikula, Intel Open Source Graphics Center
On Fri, 11 Nov 2022, Karol Herbst wrote:
> On Fri, Nov 11, 2022 at 9:16 PM Kees Cook wrote:
>>
>> On Fri, Nov 11, 2022 at 09:06:54PM +0100, Karol Herbst wrote:
>> > On Fri, Nov 11, 2022 at 8:21 PM Kees Cook wrote:
>> > >
>> > > On Fri, Nov
make
> sure fixes get into linux-next. :) For patches fixing this, please
> include these lines (but double-check the "Fixes" first):
>
> Reported-by: coverity-bot
> Addresses-Coverity-ID: 1527266 ("Null pointer dereferences")
> Fixes: a0922278f83e ("drm/nouveau/kms/nv50-: Refactor and cleanup DP HPD
> handling")
>
> Thanks for your attention!
--
Jani Nikula, Intel Open Source Graphics Center
rd ");
> +MODULE_LICENSE("GPL");
I think these annotations are incompatible with including the unit test,
and, in this case, affect drm.ko.
And we'll have two kinds of tests, those that get built via
tests/Makefile, and those that get included, like this one, which should
not be mentioned in tests/Makefile.
BR,
Jani.
--
Jani Nikula, Intel Open Source Graphics Center
hedding:
I find "pixel_clock_hz / 1000" has much more clarity than
"pixel_clock_hz / HZ_PER_KHZ".
I don't consider the SI prefixes magic numbers.
BR,
Jani.
--
Jani Nikula, Intel Open Source Graphics Center
intel_acpi_video_register() helper which checks if a panel
> is present and then calls acpi_video_register_backlight()
>
> Signed-off-by: Hans de Goede
Apologies for the delay. I truly appreciate the effort you've put into
this series, and I'm looking forward to seeing the next steps in drm!
Reviewed-by: Jani
Prefer the parsed results for is_hdmi and has_audio in display info over
calling drm_detect_hdmi_monitor() and drm_detect_monitor_audio(),
respectively.
Cc: Ben Skeggs
Cc: Karol Herbst
Cc: Lyude Paul
Cc: nouveau@lists.freedesktop.org
Signed-off-by: Jani Nikula
---
drivers/gpu/drm/nouveau
en Skeggs
Cc: Karol Herbst
Cc: Lyude Paul
Cc: nouveau@lists.freedesktop.org
Jani Nikula (9):
drm/edid: parse display info has_audio similar to is_hdmi
drm/nouveau: convert to using is_hdmi and has_audio from display info
drm/radeon: convert to using is_hdmi and has_audio from display info
On Tue, 30 Aug 2022, Maxime Ripard wrote:
> Hi,
>
> On Tue, Aug 30, 2022 at 01:43:07PM +0300, Jani Nikula wrote:
>> On Tue, 30 Aug 2022, Geert Uytterhoeven wrote:
>> > On Mon, Aug 29, 2022 at 3:13 PM Maxime Ripard wrote:
>> >> +#define STR_STRICT_EQ(str, le
construct is also duplicated elsewhere in the series, and I
kept being confused by it. The above is precisely the same as:
str_has_prefix(str, cmp) == len
Which is more intuitive and available in string.h instead of being a
local duplicate.
BR,
Jani.
--
Jani Nikula, Intel Open Source Graphics Center
On Wed, 24 Aug 2022, Hans de Goede wrote:
> Hi,
>
> On 8/24/22 14:47, Jani Nikula wrote:
>> On Wed, 24 Aug 2022, Hans de Goede wrote:
>>> On machins without an i915 opregion the acpi_video driver immediately
>>> probes the ACPI video bus and used to also im
-952,6 +954,11 @@ int intel_backlight_device_register(struct
> intel_connector *connector)
>
> WARN_ON(panel->backlight.max == 0);
>
> + if (!acpi_video_backlight_use_native()) {
> + DRM_INFO("Skipping intel_backlight regist
t;
> drm_dbg_kms(connector->base.dev,
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 69ce6db6a7c1..14b0dcaf25c2 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -756,6 +756,8 @@ struct drm_i915_private {
>
> bool ipc_enabled;
>
> + bool have_panel;
> +
> struct intel_audio_private audio;
>
> struct i915_pmu pmu;
--
Jani Nikula, Intel Open Source Graphics Center
through this in detail
and thought. I've glanced over it on a few occasions, and I don't have
anything against it really.
Acked-by: Jani Nikula
Before merging, please ensure you've sent the entire series Cc'd
intel-gfx, and got a green light from CI.
>
> Cc: Wayne Lin
> Cc: Ville S
ies from the previous topology state
>
> Signed-off-by: Lyude Paul
> Cc: Wayne Lin
> Cc: Ville Syrjälä
> Cc: Fangzhi Zuo
> Cc: Jani Nikula
> Cc: Imre Deak
> Cc: Daniel Vetter
> Cc: Sean Paul
> ---
> .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 9 +-
>
c: Wayne Lin
> Cc: Ville Syrjälä
> Cc: Fangzhi Zuo
> Cc: Jani Nikula
> Cc: Imre Deak
> Cc: Daniel Vetter
> Cc: Sean Paul
> ---
> drivers/gpu/drm/display/drm_dp_mst_topology.c | 109 --
> 1 file changed, 45 insertions(+), 64 deletions(-)
>
> diff --
rol Herbst
Cc: Laurent Pinchart
Cc: Lyude Paul
Cc: Maarten Lankhorst
Cc: Maxime Ripard
Cc: Neil Armstrong
Cc: Robert Foss
Cc: Thomas Zimmermann
Cc: Ville Syrjälä
Cc: Xinhui Pan
Cc: amd-...@lists.freedesktop.org
Cc: nouveau@lists.freedesktop.org
Jani Nikula (13):
drm/edid: add block coun
On Wed, 18 May 2022, Hans de Goede wrote:
> Hi,
>
> On 5/18/22 10:55, Jani Nikula wrote:
>> On Tue, 17 May 2022, Hans de Goede wrote:
>>> ATM on x86 laptops where we want userspace to use the acpi_video backlight
>>> device we often register both
On Wed, 18 May 2022, Hans de Goede wrote:
> Hi,
>
> On 5/18/22 10:44, Jani Nikula wrote:
>> On Tue, 17 May 2022, Hans de Goede wrote:
>>> Hi All,
>>>
>>> As mentioned in my RFC titled "drm/kms: control display brightness through
>>> dr
n it is false.
> */
Frankly, I think the boolean native parameter here, and at the call
sites, is confusing, and the slightly different explanations in the
commit message and comment here aren't helping.
I suggest adding a separate function that the native backlight drivers
should use. I think it's more obvious all around, and easier to document
too.
BR,
Jani.
--
Jani Nikula, Intel Open Source Graphics Center
ivers/platform/x86/intel/oaktrail.c | 2 +-
> drivers/platform/x86/msi-laptop.c | 2 +-
> drivers/platform/x86/msi-wmi.c| 2 +-
> drivers/platform/x86/samsung-laptop.c | 2 +-
> drivers/platform/x86/sony-laptop.c| 2 +-
> drivers/platform/x86/thinkpad_acpi.c | 4 +-
> drivers/platform/x86/toshiba_acpi.c | 2 +-
> include/acpi/video.h | 8 ++-
> 28 files changed, 156 insertions(+), 84 deletions(-)
--
Jani Nikula, Intel Open Source Graphics Center
264 100029 186bd dp/drm_dp_helper.ko.old
> 981291636 264 100029 186bd dp/drm_dp_helper.ko
> 1973432 1096402352 2085424 1fd230 nouveau/nouveau.ko.old
> 1973432 1096402352 2085424 1fd230 nouveau/nouveau.ko
>
> Signed-off-by: Lucas De Marchi
Reviewed-by: Ja
On Wed, 26 Jan 2022, Lucas De Marchi wrote:
> Sort includes alphabetically so it's easier to add/remove includes and
> know when that is needed.
>
> Signed-off-by: Lucas De Marchi
Reviewed-by: Jani Nikula
> ---
> drivers/gpu/drm/drm_gem.c | 20 ++--
>
gt; +#define PRINT_FLAG(name) drm_printf(p, "%s: %s\n", #name,
> yesno(info->display.name));
>
> Signed-off-by: Lucas De Marchi
Reviewed-by: Jani Nikula
> ---
> drivers/gpu/drm/i915/intel_device_info.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>
On Thu, 20 Jan 2022, Petr Mladek wrote:
> On Wed 2022-01-19 16:16:12, Jani Nikula wrote:
>> On Wed, 19 Jan 2022, Petr Mladek wrote:
>> > On Tue 2022-01-18 23:24:47, Lucas De Marchi wrote:
>> >> d. This doesn't bring onoff() helper as there are some places in
henko: if this is accepted, my
>> proposal is to take first 2 patches either through mm tree or maybe
>> vsprintf. Last patch can be taken later through drm.
>
> I agree with Andy that it should go via drm tree. It would make it
> easier to handle potential conflicts.
>
> Just in case, you decide to go with str_yes_no() or something similar.
> Mass changes are typically done at the end on the merge window.
> The best solution is when it can be done by a script.
>
> Best Regards,
> Petr
--
Jani Nikula, Intel Open Source Graphics Center
since this is "closer to home".
>
> I hope this is a good summary of the previous attempts and a way we can
> move forward.
Thanks for picking this up again. I agree with the approach here.
Acked-by: Jani Nikula
>
> Andrew Morton, Petr Mladek, Andy Shevchenko: if this is ac
now and list all the drm subdirectories when looking up
stuff that's part of drm but not drivers.
BR,
Jani.
--
Jani Nikula, Intel Open Source Graphics Center
On Mon, 13 Dec 2021, Thomas Zimmermann wrote:
> Hi
>
> Am 13.12.21 um 14:34 schrieb Jani Nikula:
>> On Mon, 13 Dec 2021, Thomas Zimmermann wrote:
>>> Split-off DisplayPort functions from KMS helper library and move them
>>> into their own module. Reduces the
1d9ceefcddef0be33561b1646a1cbe
> prerequisite-patch-id: c2b2f08f0eccc9f5df0c0da49fa1d36267deb11d
> prerequisite-patch-id: c67e5d886a47b7d0266d81100837557fda34cb24
> --
> 2.34.1
>
--
Jani Nikula, Intel Open Source Graphics Center
ers/gpu/drm/drm_dp_mst_topology.c
> @@ -45,7 +45,7 @@
> #include
> #include
>
> -#include "drm_crtc_helper_internal.h"
> +#include "drm_dp_helper_internal.h"
> #include "drm_dp_mst_topology_internal.h"
>
> /**
> diff --git a/drivers/gpu/drm/drm_kms_helper_common.c
> b/drivers/gpu/drm/drm_kms_helper_common.c
> index 47e92400548d..88260d26409c 100644
> --- a/drivers/gpu/drm/drm_kms_helper_common.c
> +++ b/drivers/gpu/drm/drm_kms_helper_common.c
> @@ -29,6 +29,7 @@
>
> #include
>
> +#include "drm_dp_helper_internal.h"
> #include "drm_crtc_helper_internal.h"
>
> MODULE_AUTHOR("David Airlie, Jesse Barnes");
--
Jani Nikula, Intel Open Source Graphics Center
On Fri, 05 Nov 2021, Javier Martinez Canillas wrote:
> Hello Thomas,
>
> On 11/5/21 09:43, Thomas Zimmermann wrote:
>> Hi
>>
>> Am 04.11.21 um 21:09 schrieb Javier Martinez Canillas:
>>> Hello Jani,
>>>
>>> On 11/4/21 20:57, Jani Nikula wro
static bool vga_hardscroll_enabled;
>> static bool vga_hardscroll_user_enable = true;
>>
>> -bool vgacon_text_force(void)
>> -{
>> -return vgacon_text_mode_force;
>> -}
>> -EXPORT_SYMBOL(vgacon_text_force);
>> -
>> -static int __init text_mode(char *str)
>> -{
>> -vgacon_text_mode_force = true;
>> -
>> -pr_warn("You have booted with nomodeset. This means your GPU drivers
>> are DISABLED\n");
>> -pr_warn("Any video related functionality will be severely degraded, and
>> you may not even be able to suspend the system properly\n");
>> -pr_warn("Unless you actually understand what nomodeset does, you should
>> reboot without enabling it\n");
>> -
>> -return 1;
>> -}
>> -
>> -/* force text mode - used by kernel modesetting */
>> -__setup("nomodeset", text_mode);
>> -
>> static int __init no_scroll(char *str)
>> {
>> /*
>> diff --git a/include/drm/drm_mode_config.h b/include/drm/drm_mode_config.h
>> index 48b7de80daf5..18982d3507e4 100644
>> --- a/include/drm/drm_mode_config.h
>> +++ b/include/drm/drm_mode_config.h
>> @@ -969,4 +969,10 @@ static inline int drm_mode_config_init(struct
>> drm_device *dev)
>> void drm_mode_config_reset(struct drm_device *dev);
>> void drm_mode_config_cleanup(struct drm_device *dev);
>>
>> +#ifdef CONFIG_VGA_CONSOLE
>> +extern int drm_check_modeset(void);
>> +#else
>> +static inline int drm_check_modeset(void) { return 0; }
>> +#endif
>> +
>> #endif
>> diff --git a/include/linux/console.h b/include/linux/console.h
>> index 20874db50bc8..d4dd8384898b 100644
>> --- a/include/linux/console.h
>> +++ b/include/linux/console.h
>> @@ -217,12 +217,6 @@ extern atomic_t ignore_console_lock_warning;
>> #define VESA_HSYNC_SUSPEND 2
>> #define VESA_POWERDOWN 3
>>
>> -#ifdef CONFIG_VGA_CONSOLE
>> -extern bool vgacon_text_force(void);
>> -#else
>> -static inline bool vgacon_text_force(void) { return false; }
>> -#endif
>> -
>> extern void console_init(void);
>>
>> /* For deferred console takeover */
>>
--
Jani Nikula, Intel Open Source Graphics Center
bled\n", driver->name);
> + return -ENODEV;
> + }
> +
> + return 0;
> +}
> +EXPORT_SYMBOL(drm_drv_enabled);
The name implies a bool return, but it's not.
if (drm_drv_enabled(...)) {
/* surprise, it's disabled! */
}
BR,
Jani.
--
Jani Nikula, Intel Open Source Graphics Center
l clash.
>
> Just add a
> const drm_driver * i915_drm_driver(void)
> {
> return
> }
>
> And then use this function to access the drm_driver variable.
Agreed on the general principle of exposing interfaces over data.
But... why? I'm still at a loss what problem this solves. We pass
to exactly one place, devm_drm_dev_alloc(), and it's neatly
hidden away.
BR,
Jani.
--
Jani Nikula, Intel Open Source Graphics Center
i915_modparams.modeset == -1)
>> +ret = drm_drv_enabled();
>
> You pass the local driver variable here - which looks wrong as this is
> not the same as the driver variable declared in another file.
Indeed.
> Maybe move the check to new function you can add to init_funcs,
> and locate the new function in i915_drv - so it has access to driver?
We don't really want that, though. This check is pretty much as early as
it can be, and there's a ton of useless initialization that would happen
if we waited until drm_driver is available.
>From my POV, drm_drv_enabled() is a solution that creates a worse
problem for us than it solves.
BR,
Jani.
>
>
> Sam
--
Jani Nikula, Intel Open Source Graphics Center
1 - 100 of 161 matches
Mail list logo