DRM edid*/
> struct dc_edid_caps edid_caps; /* parse display caps */
> struct dc_container_id *dc_container_id;
> uint32_t dongle_max_pix_clk;
--
Jani Nikula, Intel
*edid);
> int drm_edid_connector_add_modes(struct drm_connector *connector);
> bool drm_edid_is_digital(const struct drm_edid *drm_edid);
> +bool drm_edid_eq(const struct drm_edid *drm_edid_first,
> + const struct drm_edid *drm_edid_second);
Nitpick, parameter names in the declaration differ from the ones in the
definition.
With the above fixed,
Reviewed-by: Jani Nikula
> void drm_edid_get_product_id(const struct drm_edid *drm_edid,
>struct drm_edid_product_id *id);
> void drm_edid_print_product_id(struct drm_printer *p,
--
Jani Nikula, Intel
7 @@ struct dc_sink *link_add_remote_sink(
> if (!dc_sink)
> return NULL;
>
> - memmove(dc_sink->dc_edid.raw_edid, (const uint8_t *) edid, len);
> - dc_sink->dc_edid.length = len;
> + dc_edid_copy_edid_to_dc(dc_sink, edid, len);
>
> if (!link_add_remote_sink_helper(
> link,
--
Jani Nikula, Intel
itor_name(const struct edid *edid, char *name,
> -int buflen);
> +void drm_edid_get_monitor_name(const struct drm_edid *drm_edid,
> + char *name,
> +int bufsize);
Please move this under the section:
/* Interface based on struct drm_edid */
further down.
> +void drm_edid_raw_get_monitor_name(const struct edid *edid, char *name,
> +int bufsize);
> struct drm_display_mode *drm_mode_find_dmt(struct drm_device *dev,
> int hsize, int vsize, int fresh,
> bool rb);
--
Jani Nikula, Intel
put.
>>>
>>> v5: change to macro from function (Christian Koenig)
>>> add helper functions for lock/unlock (Christian Koenig)
>>>
>>> v6: remove __maybe_unused and make function inline (Jani Nikula)
>>> remove drm_print.h
>>>
>
On Thu, 17 Apr 2025, Christian König wrote:
> Am 17.04.25 um 11:35 schrieb Jani Nikula:
>> On Thu, 17 Apr 2025, Sunil Khatri wrote:
>>> Add a drm helper macro which append the process information for
>>> the drm_file over drm_err.
>>>
>>> v5: ch
On Thu, 17 Apr 2025, "Khatri, Sunil" wrote:
> On 4/16/2025 7:55 PM, Jani Nikula wrote:
>> On Wed, 16 Apr 2025, Sunil Khatri wrote:
>>> Add a drm helper macro which append the process information for
>>> the drm_file over drm_err.
>>>
>>>
On Thu, 17 Apr 2025, Christian König wrote:
> Am 17.04.25 um 13:07 schrieb Jani Nikula:
>> On Thu, 17 Apr 2025, Christian König wrote:
>>> Am 17.04.25 um 11:35 schrieb Jani Nikula:
>>>> On Thu, 17 Apr 2025, Sunil Khatri wrote:
>>>>> Add a drm help
maybe_unused and make function inline (Jani Nikula)
> remove drm_print.h
I guess I gave all kinds of comments, but in the end my conclusion was:
why does *any* of this have to be static inline or macros? Make
drm_file_err() a regular function and hide the implementation inside
drm_file.c. That
: If set, disable DCN Sub-Viewport feature in
> amdgpu driver.
> - */
> DC_DISABLE_SUBVP = 0x2,
> - /**
> - * @DC_DISABLE_CUSTOM_BRIGHTNESS_CURVE: If set, disable support for
> custom brightness curves
> - */
> DC_DISABLE_CUSTOM_BRIGHTNESS_CURVE = 0x4,
> -
> - /**
> - * @DC_HDCP_LC_FORCE_FW_ENABLE: If set, use HDCP Locality Check FW
> - * path regardless of reported HW capabilities.
> - */
> DC_HDCP_LC_FORCE_FW_ENABLE = 0x8,
> -
> - /**
> - * @DC_HDCP_LC_ENABLE_SW_FALLBACK If set, upon HDCP Locality Check FW
> - * path failure, retry using legacy SW path.
> - */
> DC_HDCP_LC_ENABLE_SW_FALLBACK = 0x10,
> };
--
Jani Nikula, Intel
hat matter, why is *this* inline? For debugs it makes a little more
sense when it adds the function, but drm_err() doesn't.
Make all of these real functions, no need to include drm_print.h, and
everything is better.
BR,
Jani.
> void drm_file_update_pid(struct drm_file *);
>
> struct drm_minor *drm_minor_acquire(struct xarray *minors_xa, unsigned int
> minor_id);
--
Jani Nikula, Intel
above statement
being replicated all over the place. It's fundamentally incompatible
with the HF-EEODB EDID extension block.
BR,
Jani.
> + memcpy(sink->dc_edid.raw_edid, (uint8_t *) edid, edid_length);
> + sink->dc_edid.length = edid_length;
> }
>
>
--
Jani Nikula, Intel
&connector->eld[DRM_ELD_MONITOR_NAME_STRING],
> +AMDGPU_ELD_DISPLAY_NAME_SIZE_IN_CHARS);
It's not that simple. The monitor name in ELD is not fixed length (see
drm_eld_mnl()) and neither is it guaranteed to be NUL terminated.
BR,
Jani.
>
> edid_caps->edid_hdmi = connector->display_info.is_hdmi;
--
Jani Nikula, Intel
s(struct drm_printer *p, struct drm_file *file);
> void drm_show_fdinfo(struct seq_file *m, struct file *f);
> +void drm_process_info(struct drm_file *file_priv, char *proc_info, size_t
> buff_size);
>
> struct file *mock_drm_getfile(struct drm_minor *minor, unsigned int flags);
--
Jani Nikula, Intel
; drm_connector_list_iter_end(&iter);
>
> - if (need_hotplug)
> - drm_kms_helper_hotplug_event(ddev);
> -
> amdgpu_dm_irq_resume_late(adev);
>
> amdgpu_dm_smu_write_watermarks_table(adev);
>
> + drm_kms_helper_hotplug_event(ddev);
> +
> return 0;
> }
--
Jani Nikula, Intel
> DRM_BUDDY_CLEAR_ALLOCATION),
> + "buddy_alloc hit an error size=%lu\n", 2 * ps);
> + drm_buddy_free_list(&mm, &allocated, DRM_BUDDY_CLEARED);
> + KUNIT_ASSERT_FALSE_MSG(test, drm_buddy_alloc
x10/0x10
> ret_from_fork_asm+0x1a/0x30
>
> ---[ end trace 0000 ]---
>
> I hope this tells you something. I'm willing to switch to some cutting
> edge kernel commit and report back if I get an oops again, so feel
> free which remote and commit I should go get, or any other
> troubleshooting steps I could follow.
>
> Thanks for all your hard work,
>
> Emil J. Tywoniak (widlarizer)
--
Jani Nikula, Intel
On Mon, 16 Dec 2024, Thomas Weißschuh wrote:
> The sysfs core now allows instances of 'struct bin_attribute' to be
> moved into read-only memory. Make use of that to protect them against
> accidental or malicious modifications.
>
> Signed-off-by: Thomas Weißschuh
On Mon, 16 Dec 2024, Thomas Weißschuh wrote:
> The sysfs core now allows instances of 'struct bin_attribute' to be
> moved into read-only memory. Make use of that to protect them against
> accidental or malicious modifications.
>
> Signed-off-by: Thomas Weißschuh
long with the common
DRIVER_DATE macros.
v2: Also update drivers/accel (kernel test robot)
Reviewed-by: Javier Martinez Canillas
Acked-by: Alex Deucher
Acked-by: Simon Ser
Acked-by: Jeffrey Hugo
Signed-off-by: Jani Nikula
---
Cc: David Airlie
Cc: Hamza Mahfooz
Cc: Javier Martinez C
v
Reviewed-by: Jani Nikula
and
Acked-by: Jani Nikula
for merging via whichever tree you find best.
> ---
> drivers/gpu/drm/i915/display/intel_audio.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_audio.c
> b/drivers/gpu
2001,11 @@ struct drm_connector {
> struct drm_encoder *encoder;
>
> #define MAX_ELD_BYTES128
> - /** @eld: EDID-like data, if present */
> + /** @eld: EDID-like data, if present, protected by @eld_mutex */
> uint8_t eld[MAX_ELD_BYTES];
> + /** @eld_mutex: protection for concurrenct access to @eld */
> + struct mutex eld_mutex;
> +
> /** @latency_present: AV delay info from ELD, if found */
> bool latency_present[2];
> /**
--
Jani Nikula, Intel
ugfs.c | 2 +-
>> .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 20 +-
>> .../display/amdgpu_dm/amdgpu_dm_mst_types.c | 28 +-
>> drivers/gpu/drm/display/drm_dp_mst_topology.c | 261 ++++--
>> drivers/gpu/drm/i915/display/intel_dp.c | 2 +-
>> drivers/gpu/drm/i915/display/intel_dp_mst.c | 3 +-
>> include/drm/display/drm_dp_mst_helper.h | 9 +-
>> 7 files changed, 147 insertions(+), 178 deletions(-)
>>
>> --
>> 2.43.0
>
--
Jani Nikula, Intel
Acked-by: Jani Nikula
--
Jani Nikula, Intel
hkov
Acked-by: Jani Nikula
> ---
> drivers/gpu/drm/i915/display/intel_dp_mst.c | 2 +-
> include/drm/drm_modeset_helper_vtables.h| 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c
> b/drivers/gpu/drm
m_encoder_slave to nouveau
> is really the best course for now.
Granted, the dvo part of i915 is ugly, but it's also only relevant for
the oldest hardware i915 supports. Like 20 years old. Not sure there's
much return on investment in big refactoring, more risk that it breaks
without nobody noticing. Just let it be in i915?
BR,
Jani.
--
Jani Nikula, Intel
status gem object func does
> - * not need to consider this.)
> + * is idle and resident to return this bit, i.e. userspace can mark a buffer
> as
> + * purgeable even while it is still busy on the GPU. It whill not get
> reported
> + * in the puregeable stats until it becomes idle. The status gem object func
> + * does not need to consider this.
> */
> enum drm_gem_object_status {
> DRM_GEM_OBJECT_RESIDENT = BIT(0),
> DRM_GEM_OBJECT_PURGEABLE = BIT(1),
> + DRM_GEM_OBJECT_ACTIVE = BIT(2),
> };
>
> /**
--
Jani Nikula, Intel
long with the common
DRIVER_DATE macros.
v2: Also update drivers/accel (kernel test robot)
Reviewed-by: Javier Martinez Canillas
Acked-by: Alex Deucher
Acked-by: Simon Ser
Signed-off-by: Jani Nikula
---
Cc: David Airlie
Cc: Hamza Mahfooz
Cc: Javier Martinez Canillas
Cc: Maarten Lankhors
On Fri, 25 Oct 2024, Jani Nikula wrote:
> On Fri, 25 Oct 2024, Raag Jadav wrote:
>> @@ -70,6 +73,16 @@ static struct dentry *drm_debugfs_root;
>>
>> DEFINE_STATIC_SRCU(drm_unplug_srcu);
>>
>> +/*
>> + * Available recovery methods for wedged d
url:
> https://github.com/intel-lab-lkp/linux/commits/Jani-Nikula/drm-remove-driver-date-from-struct-drm_driver-and-all-drivers/20241025-002344
> base: git://anongit.freedesktop.org/drm/drm-misc drm-misc-next
> patch link:
> https://lore.kernel.org/r/20241024162240.2398664-2-jan
long with the common
DRIVER_DATE macros.
Signed-off-by: Jani Nikula
---
Cc: David Airlie
Cc: Hamza Mahfooz
Cc: Javier Martinez Canillas
Cc: Maarten Lankhorst
Cc: Maxime Ripard
Cc: Oleksandr Andrushchenko
Cc: Simon Ser
Cc: Simona Vetter
Cc: Thomas Zimmermann
Cc: Ville
uldn't be
>> forgotten as easily.
>
> Ping, anyone have thoughts on this? I'd like to get something
> like this in at some point to make the legacy state (ab)users
> easily visible...
On the approach,
Acked-by: Jani Nikula
with or without converting legacy into a point
struct drm_framebuffer *old_fb;
>> +} legacy;
and
} __legacy;
struct __plane_legacy_or_something *legacy;
and initially unconditionally:
p->legacy = &p->__legacy;
but later, once atomic drivers have been fixed:
if (!drm_core_check_feature(dev, DRIVER_COMPUTE_ATOMIC))
p->legacy = &p->__legacy;
It would make the last update really simple.
BR,
Jani.
>>
>> /** @funcs: plane control functions */
>> const struct drm_plane_funcs *funcs;
>> --
>> 2.45.2
--
Jani Nikula, Intel
ev_wedged_event() as recovery @method. Callers can
> + * use any one, multiple (or'd) or none depending on their needs.
> + */
> +#define DRM_WEDGE_RECOVERY_REBINDBIT(0) /* unbind + rebind driver */
> +#define DRM_WEDGE_RECOVERY_BUS_RESET BIT(1) /* unbind + reset bus device +
> rebind */
>
> /**
> * enum switch_power_state - power state of drm device
> diff --git a/include/drm/drm_drv.h b/include/drm/drm_drv.h
> index 02ea4e3248fd..cc7bcb94ad6a 100644
> --- a/include/drm/drm_drv.h
> +++ b/include/drm/drm_drv.h
> @@ -461,6 +461,7 @@ void drm_put_dev(struct drm_device *dev);
> bool drm_dev_enter(struct drm_device *dev, int *idx);
> void drm_dev_exit(int idx);
> void drm_dev_unplug(struct drm_device *dev);
> +int drm_dev_wedged_event(struct drm_device *dev, unsigned long method);
>
> /**
> * drm_dev_is_unplugged - is a DRM device unplugged
--
Jani Nikula, Intel
another bool flag parameter to the
> function.
Funny, the other day Ville and I were throwing ideas around, and we
talked about something like this to implement keyword arguments in C. :)
Cheers,
Jani.
--
Jani Nikula, Intel
On Mon, 30 Sep 2024, Thomas Zimmermann wrote:
> DRM's aperture functions have long been implemented as helpers
> under drivers/video/ for use with fbdev. Avoid the DRM wrappers by
> calling the video functions directly.
>
> Signed-off-by: Thomas Zimmermann
> Cc: Ja
ditional comments on this I'm going to pick it
> up and merge it through drm-misc-next by the end of today.
AFAICT the userspace is not reviewed and ready for merging [1].
BR,
Jani.
[1] https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/1428
--
Jani Nikula, Intel
> + goto out_dsc_fail;
> + }
>
> - return NULL;
> + return;
> +
> +out_dsc_fail:
> + port->dsc_aux = NULL;
> + port->dsc_passthrough_aux = NULL;
> + return;
> }
> EXPORT_SYMBOL(drm_dp_mst_dsc_aux_for_port);
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c
> b/drivers/gpu/drm/i915/display/intel_dp.c
> index a1fcedfd404b..d39a7c6f5bfa 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -3219,7 +3219,7 @@ intel_dp_sink_set_dsc_passthrough(const struct
> intel_connector *connector,
> {
> struct drm_i915_private *i915 = to_i915(connector->base.dev);
> struct drm_dp_aux *aux = connector->port ?
> - connector->port->passthrough_aux : NULL;
> + connector->port->dsc_passthrough_aux : NULL;
>
> if (!aux)
> return;
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c
> b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> index 15541932b809..73cb1c673525 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> @@ -1699,7 +1699,8 @@ static struct drm_connector
> *intel_dp_add_mst_connector(struct drm_dp_mst_topolo
>
> intel_dp_init_modeset_retry_work(intel_connector);
>
> - intel_connector->dp.dsc_decompression_aux =
> drm_dp_mst_dsc_aux_for_port(port);
> + drm_dp_mst_dsc_aux_for_port(port);
> + intel_connector->dp.dsc_decompression_aux = port->dsc_aux;
> intel_dp_mst_read_decompression_port_dsc_caps(intel_dp,
> intel_connector);
> intel_connector->dp.dsc_hblank_expansion_quirk =
> detect_dsc_hblank_expansion_quirk(intel_connector);
> diff --git a/include/drm/display/drm_dp.h b/include/drm/display/drm_dp.h
> index a6f8b098c56f..fa454506866b 100644
> --- a/include/drm/display/drm_dp.h
> +++ b/include/drm/display/drm_dp.h
> @@ -980,6 +980,7 @@
> #define DP_BRANCH_REVISION_START0x509
> #define DP_BRANCH_HW_REV0x509
> #define DP_BRANCH_SW_REV0x50A
> +#define DP_BRANCH_VENDOR_SPECIFIC_START 0x50C
>
> /* Link/Sink Device Power Control */
> #define DP_SET_POWER0x600
> diff --git a/include/drm/display/drm_dp_helper.h
> b/include/drm/display/drm_dp_helper.h
> index 279624833ea9..5eb583004d00 100644
> --- a/include/drm/display/drm_dp_helper.h
> +++ b/include/drm/display/drm_dp_helper.h
> @@ -643,6 +643,7 @@ struct drm_dp_dpcd_ident {
> u8 hw_rev;
> u8 sw_major_rev;
> u8 sw_minor_rev;
> + u8 vendor_data[4];
> } __packed;
>
> /**
> @@ -711,6 +712,13 @@ enum drm_dp_quirk {
>* requires enabling DSC.
>*/
> DP_DPCD_QUIRK_HBLANK_EXPANSION_REQUIRES_DSC,
> + /**
> + * @DP_DPCD_QUIRK_DSC_MUST_ROOT_DECOMPRESSION:
> + *
> + * The device has internal virutual dpcd with dsc decoding cap,
> + * but dsc decoding must be done at root mstb.
> + */
> + DP_DPCD_QUIRK_DSC_MUST_ROOT_DECOMPRESSION,
> };
>
> /**
> diff --git a/include/drm/display/drm_dp_mst_helper.h
> b/include/drm/display/drm_dp_mst_helper.h
> index f6a1cbb0f600..b04ca4a97af2 100644
> --- a/include/drm/display/drm_dp_mst_helper.h
> +++ b/include/drm/display/drm_dp_mst_helper.h
> @@ -135,7 +135,8 @@ struct drm_dp_mst_port {
>*/
> struct drm_dp_mst_branch *mstb;
> struct drm_dp_aux aux; /* i2c bus for this port? */
> - struct drm_dp_aux *passthrough_aux;
> + struct drm_dp_aux *dsc_aux;
> + struct drm_dp_aux *dsc_passthrough_aux;
> struct drm_dp_mst_branch *parent;
>
> struct drm_connector *connector;
> @@ -956,7 +957,7 @@ bool drm_dp_mst_port_is_logical(struct drm_dp_mst_port
> *port)
> }
>
> struct drm_dp_aux *drm_dp_mst_aux_for_parent(struct drm_dp_mst_port *port);
> -struct drm_dp_aux *drm_dp_mst_dsc_aux_for_port(struct drm_dp_mst_port *port);
> +void drm_dp_mst_dsc_aux_for_port(struct drm_dp_mst_port *port);
>
> static inline struct drm_dp_mst_topology_state *
> to_drm_dp_mst_topology_state(struct drm_private_state *state)
--
Jani Nikula, Intel
drm subsystem Makefile
> subdir-ccflags-y += -Wno-override-init
> +subdir-ccflags-y += $(call cc-option, -Wformat-truncation)
> subdir-ccflags-$(CONFIG_DRM_AMDGPU_WERROR) += -Werror
>
> amdgpu-y := amdgpu_drv.o
--
Jani Nikula, Intel
On Wed, 28 Aug 2024, Harry Wentland wrote:
> On 2024-08-28 09:58, Alex Deucher wrote:
>> On Wed, Aug 28, 2024 at 9:53 AM Jani Nikula wrote:
>>>
>>> On Wed, 28 Aug 2024, Daniel Vetter wrote:
>>>> On Mon, Aug 12, 2024 at 03:23:12PM +0300, Jani Nikula wrote:
On Wed, 28 Aug 2024, Daniel Vetter wrote:
> On Mon, Aug 12, 2024 at 03:23:12PM +0300, Jani Nikula wrote:
>> Instead of just smashing jiffies into a GUID, use guid_gen() to generate
>> RFC 4122 compliant GUIDs.
>>
>> Signed-off-by: Jani Nikula
>>
>>
On Wed, 28 Aug 2024, Hamza Mahfooz wrote:
> On 8/12/24 08:23, Jani Nikula wrote:
>> Instead of just smashing jiffies into a GUID, use guid_gen() to generate
>> RFC 4122 compliant GUIDs.
>>
>> Signed-off-by: Jani Nikula
>>
>> ---
>
> Acked-by: H
On Wed, 28 Aug 2024, Jani Nikula wrote:
> On Wed, 28 Aug 2024, Hamza Mahfooz wrote:
>> On 8/12/24 08:23, Jani Nikula wrote:
>>> Instead of just smashing jiffies into a GUID, use guid_gen() to generate
>>> RFC 4122 compliant GUIDs.
>>>
>>> Signed-off
eparate digital and
> analog connectors
>* with a shared ddc line (often vga + hdmi)
> diff --git a/drivers/gpu/drm/radeon/radeon_mode.h
> b/drivers/gpu/drm/radeon/radeon_mode.h
> index 421c83fc70dc..ae1d91cd93ec 100644
> --- a/drivers/gpu/drm/radeon/radeon_mode.h
> +++ b/drivers/gpu/drm/radeon/radeon_mode.h
> @@ -38,7 +38,6 @@
> #include
> #include
>
> -struct edid;
> struct drm_edid;
> struct radeon_bo;
> struct radeon_device;
> @@ -521,7 +520,7 @@ struct radeon_connector {
> bool use_digital;
> /* we need to mind the EDID between detect
> and get modes due to analog/digital/tvencoder */
> - struct edid *edid;
> + const struct drm_edid *drm_edid;
> void *con_priv;
> bool dac_load_detect;
> bool detected_by_load; /* if the connection status was determined by
> load */
> @@ -843,7 +842,7 @@ radeon_get_crtc_scanout_position(struct drm_crtc *crtc,
> bool in_vblank_irq,
>const struct drm_display_mode *mode);
>
> extern bool radeon_combios_check_hardcoded_edid(struct radeon_device *rdev);
> -extern struct edid *
> +extern const struct drm_edid *
> radeon_bios_get_hardcoded_edid(struct radeon_device *rdev);
> extern bool radeon_atom_get_clock_info(struct drm_device *dev);
> extern bool radeon_combios_get_clock_info(struct drm_device *dev);
>
> ---
> base-commit: 19cff16559a4f2d763faf4f8392bf86d3a21b93c
> change-id: 20240818-radeon-drm_edid-9f0cec36e227
>
> Best regards,
--
Jani Nikula, Intel
rm_edid *drm_edid_dup(const struct drm_edid *drm_edid);
> void drm_edid_free(const struct drm_edid *drm_edid);
> +bool drm_edid_equal(const struct drm_edid *drm_edid_a, const struct drm_edid
> *drm_edid_b);
> bool drm_edid_valid(const struct drm_edid *drm_edid);
> const struct edid *drm_edid_raw(const struct drm_edid *drm_edid);
> const struct drm_edid *drm_edid_read(struct drm_connector *connector);
--
Jani Nikula, Intel
ector->mst_status,
> MST_REMOTE_EDID, true);
> }
> @@ -361,7 +362,7 @@ static int dm_dp_mst_get_modes(struct drm_connector
> *connector)
> .sink_signal = SIGNAL_TYPE_DISPLAY_PORT_MST };
> dc_sink = dc_link_add_remote_sink(
> aconnector->dc_link,
> - aconnector->edid,
> + drm_edid_raw(aconnector->drm_edid),
> &init_params);
>
> if (!dc_sink) {
> @@ -403,7 +404,7 @@ static int dm_dp_mst_get_modes(struct drm_connector
> *connector)
>
> if (aconnector->dc_sink) {
> amdgpu_dm_update_freesync_caps(
> - connector, aconnector->edid);
> + connector, aconnector->drm_edid);
>
> #if defined(CONFIG_DRM_AMD_DC_FP)
> if (!validate_dsc_caps_on_connector(aconnector))
> @@ -417,10 +418,9 @@ static int dm_dp_mst_get_modes(struct drm_connector
> *connector)
> }
> }
>
> - drm_connector_update_edid_property(
> - &aconnector->base, aconnector->edid);
> + drm_edid_connector_update(&aconnector->base, aconnector->drm_edid);
>
> - ret = drm_add_edid_modes(connector, aconnector->edid);
> + ret = drm_edid_connector_add_modes(connector);
>
> return ret;
> }
> @@ -498,7 +498,7 @@ dm_dp_mst_detect(struct drm_connector *connector,
>
> dc_sink_release(aconnector->dc_sink);
> aconnector->dc_sink = NULL;
> - aconnector->edid = NULL;
> + aconnector->drm_edid = NULL;
> aconnector->dsc_aux = NULL;
> port->passthrough_aux = NULL;
--
Jani Nikula, Intel
d, int block, bool print_bad_edid,
> bool *edid_corrupt);
> -bool drm_edid_is_valid(struct edid *edid);
> +bool drm_edid_is_valid(const struct edid *edid);
> void drm_edid_get_monitor_name(const struct edid *edid, char *name,
> int buflen);
> struct drm_display_mode *drm_mode_find_dmt(struct drm_device *dev,
--
Jani Nikula, Intel
nd should not include intel_fbdev.h directly.
There's a xe_display_driver_set_hooks() call that is the right place to
set the driver->fbdev_probe hook.
It's a bit of a bummer in the sense that this prevents struct drm_driver
from being const, but that's how it already is for xe.
BR,
Jani.
--
Jani Nikula, Intel
uot;Quirks for panel backlight overrides");
> +MODULE_LICENSE("GPL");
> diff --git a/include/drm/drm_utils.h b/include/drm/drm_utils.h
> index 70775748d243..267711028dd4 100644
> --- a/include/drm/drm_utils.h
> +++ b/include/drm/drm_utils.h
> @@ -11,9 +11,12 @@
> #define __DRM_UTILS_H__
>
> #include
> +#include
Please prefer forward declarations over includes where possible.
Here,
struct drm_edid;
is sufficient.
BR,
Jani.
>
> int drm_get_panel_orientation_quirk(int width, int height);
>
> +int drm_get_panel_min_brightness_quirk(const struct drm_edid *edid);
> +
> signed long drm_timeout_abs_to_jiffies(int64_t timeout_nsec);
>
> #endif
--
Jani Nikula, Intel
The kernel has a guid_t type for GUIDs. Switch to using it, but avoid
any functional changes here.
Signed-off-by: Jani Nikula
---
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
drivers/gpu/drm/display/drm_dp_mst_topology.c | 67 +++
include/drm/display
Instead of just smashing jiffies into a GUID, use guid_gen() to generate
RFC 4122 compliant GUIDs.
Signed-off-by: Jani Nikula
---
drivers/gpu/drm/display/drm_dp_mst_topology.c | 10 +-
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/drivers/gpu/drm/display
Instead of just smashing jiffies into a GUID, use guid_gen() to generate
RFC 4122 compliant GUIDs.
Signed-off-by: Jani Nikula
---
Side note, it baffles me why amdgpu has a copy of this instead of
plumbing it into drm mst code.
---
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 23
addressing Alex Hung's feedback
> from the previous version.
FWIW, I glanced through this and didn't spot anything out of the
ordinary. That said, I also didn't do detailed review of it, so I'm not
providing my R-b.
BR,
Jani.
--
Jani Nikula, Intel
On Thu, 01 Aug 2024, Thomas Zimmermann wrote:
> Hi
>
> Am 01.08.24 um 14:33 schrieb Jani Nikula:
>> On Mon, 01 Jul 2024, Xaver Hugl wrote:
>>> Am Do., 20. Juni 2024 um 22:22 Uhr schrieb Xaver Hugl
>>> :
>>>> Merging can only happen once a real wor
nging the power saving level
> "works" but the screen blanks for a moment (might just be a single
> frame) and reading from the file returns zero again, with the visuals
> and backlight level unchanged as well.
--
Jani Nikula, Intel
On Wed, 31 Jul 2024, Thomas Zimmermann wrote:
> Hi
>
> Am 31.07.24 um 14:56 schrieb Jani Nikula:
>> On Wed, 31 Jul 2024, Thomas Zimmermann wrote:
>>> Replace FB_BLANK_ constants with their counterparts from the
>>> backlight subsystem. The values are ident
rightness override
>
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6
> drivers/gpu/drm/drm_connector.c | 34
> +++
> include/drm/drm_connector.h | 2 ++
> 3 files changed, 42 insertions(+)
> ---
> base-commit: 36821612eb3091a21f7f4a907b497064725080c3
> change-id: 20240610-amdgpu-min-backlight-quirk-8402fd8e736a
>
> Best regards,
--
Jani Nikula, Intel
On Wed, 31 Jul 2024, Thomas Zimmermann wrote:
> Replace FB_BLANK_ constants with their counterparts from the
> backlight subsystem. The values are identical, so there's no
> change in functionality or semantics.
>
> Signed-off-by: Thomas Zimmermann
> Cc: Jani Nikula
&
nfo->vics = NULL;
> info->vics_len = 0;
> @@ -6849,6 +7259,21 @@ static int add_displayid_detailed_modes(struct
> drm_connector *connector,
> return num_modes;
> }
>
> +static int add_ovt_modes(struct drm_connector *connector)
> +{
> + struct drm_display_info *info = &connector->display_info;
> + int i;
> +
> + for (i = 0; i < info->num_ovt_modes; i++) {
> + drm_mode_probed_add(connector, info->ovt_modes[i]);
> + info->ovt_modes[i] = NULL;
> + }
> +
> + info->num_ovt_modes = 0;
> +
> + return i;
> +}
> +
> static int _drm_edid_connector_add_modes(struct drm_connector *connector,
>const struct drm_edid *drm_edid)
> {
> @@ -6872,6 +7297,7 @@ static int _drm_edid_connector_add_modes(struct
> drm_connector *connector,
>*
>* XXX order for additional mode types in extension blocks?
>*/
> + num_modes += add_ovt_modes(connector);
Why first?
> num_modes += add_detailed_modes(connector, drm_edid);
> num_modes += add_cvt_modes(connector, drm_edid);
> num_modes += add_standard_modes(connector, drm_edid);
> diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h
> index 5ad735253413..35b5eb344ea8 100644
> --- a/include/drm/drm_connector.h
> +++ b/include/drm/drm_connector.h
> @@ -829,6 +829,18 @@ struct drm_display_info {
>*/
> u32 max_dsc_bpp;
>
> + /**
> + * @ovt_modes: Array of @num_ovt_modes OVT modes. Internal to EDID
> + * parsing.
> + */
> + struct drm_display_mode **ovt_modes;
> +
> + /**
> + * @num_ovt_modes: Number of elements in @ovt_modes. Internal to EDID
> + * parsing.
> + */
> + int num_ovt_modes;
> +
I really hope we can get rid of this.
> /**
>* @vics: Array of vics_len VICs. Internal to EDID parsing.
>*/
--
Jani Nikula, Intel
On Fri, 26 Jul 2024, Alex Deucher wrote:
> Applied the series. Thanks!
Ah, replied to patch 1 before noticing this. Never mind about the
bikeshedding. :)
BR,
Jani.
--
Jani Nikula, Intel
pu_device *adev = (struct amdgpu_device *)handle;
>
> - kfree(adev->mode_info.bios_hardcoded_edid);
> + drm_edid_free(adev->mode_info.bios_hardcoded_edid);
>
> drm_kms_helper_poll_fini(adev_to_drm(adev));
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
> b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
> index dc73e301d937..a6a3adf2ae13 100644
> --- a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
> @@ -2766,7 +2766,7 @@ static int dce_v8_0_sw_fini(void *handle)
> {
> struct amdgpu_device *adev = (struct amdgpu_device *)handle;
>
> - kfree(adev->mode_info.bios_hardcoded_edid);
> + drm_edid_free(adev->mode_info.bios_hardcoded_edid);
>
> drm_kms_helper_poll_fini(adev_to_drm(adev));
--
Jani Nikula, Intel
BIT(2)
> #define DRM_BUDDY_CLEAR_ALLOCATION BIT(3)
> #define DRM_BUDDY_CLEAREDBIT(4)
> +#define DRM_BUDDY_TRIM_DISABLE BIT(5)
>
> struct drm_buddy_block {
> #define DRM_BUDDY_HEADER_OFFSET GENMASK_ULL(63, 12)
> @@ -155,6 +156,7 @@ int drm_buddy_alloc_blocks(struct drm_buddy *mm,
> unsigned long flags);
>
> int drm_buddy_block_trim(struct drm_buddy *mm,
> + u64 *start,
>u64 new_size,
>struct list_head *blocks);
>
>
> base-commit: b27d70e1042bf6a31ba7e5acf58b61c9cd28f95b
--
Jani Nikula, Intel
ely.
>
> Right, so I think this should be investigated closer and then get
> framework to issue a BIOS fix, not add a quirk mechanism to the kernel.
>
> IIRC the amdgpu driver will use AMDGPU_DM_DEFAULT_MIN_BACKLIGHT when
> that setting is 0 in the VBT.
>
>>
>>> The minimum brightness override set this way will still need hooking up
>>> in each driver separately but by using the video=eDP-1:... mechanism
>>> we can document how to do this in driver independent manner. since
>>> I know there have been multiple requests for something like this in
>>> the past I believe that having a single uniform way for users to do this
>>> will be good.
>>>
>>> Alternatively we could have each driver have a driver specific module-
>>> parameter for this. Either way I think we need some way for users to
>>> override this as a config/setting tweak rather then use quirks for this.
>>
>> This also seems much too complicated for normal users.
>
> I agree that having a uniform way is better then having per driver
> module options.
>
> Regards,
>
> Hans
>
--
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
bg_kms(dev, "[CONNECTOR:%d:%s] lid is closed,
> disabling\n",
> connector->base.id, connector->name);
> enabled[i] = false;
> }
> +#endif
> }
> }
No. This is because
CONFIG_DRM=y
CONFIG_ACPI_BUTTON=m
The pedantically correct fix is probably having DRM
depends on ACPI_BUTTON || ACPI_BUTTON=n
but seeing how i915 and xe just
select ACPI_BUTTON if ACPI
and nouveau basically uses acpi_lid_open() it if it's reachable with no
regard to kconfig, it's anyone's guess what will work.
BR,
Jani.
--
Jani Nikula, Intel
On Thu, 23 May 2024, Jani Nikula wrote:
> Since commit a61ddb4393ad ("drm: enable (most) W=1 warnings by default
> across the subsystem"), most of the extra warnings in the driver
> Makefile are redundant. Remove them.
>
> Note that -Wmissing-declarations and -Wmiss
On Thu, 23 May 2024, Jani Nikula wrote:
> Since commit a61ddb4393ad ("drm: enable (most) W=1 warnings by default
> across the subsystem"), most of the extra warnings in the driver
> Makefile are redundant. Remove them.
>
> Note that -Wmissing-declarations and -Wmiss
On Thu, 23 May 2024, Jani Nikula wrote:
> Since commit a61ddb4393ad ("drm: enable (most) W=1 warnings by default
> across the subsystem"), most of the extra warnings in the driver
> Makefile are redundant. Remove them.
>
> Note that -Wmissing-declarations and -Wmiss
We have a guid_t type for GUIDs, switch to using it instead of hand
rolling buffers. Convert to guid_gen() in separate patches to pinpoint
the functional changes.
BR,
Jani.
Jani Nikula (3):
drm/mst: switch to guid_t type for GUID
drm/mst: switch to guid_gen() to generate valid GUIDs
drm
Instead of just smashing jiffies into a GUID, use guid_gen() to generate
RFC 4122 compliant GUIDs.
Signed-off-by: Jani Nikula
---
Side note, it baffles me why amdgpu has a copy of this instead of
plumbing it into drm mst code.
---
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 23
Instead of just smashing jiffies into a GUID, use guid_gen() to generate
RFC 4122 compliant GUIDs.
Signed-off-by: Jani Nikula
---
drivers/gpu/drm/display/drm_dp_mst_topology.c | 10 +-
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/drivers/gpu/drm/display
The kernel has a guid_t type for GUIDs. Switch to using it, but avoid
any functional changes here.
Signed-off-by: Jani Nikula
---
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
drivers/gpu/drm/display/drm_dp_mst_topology.c | 67 +++
include/drm/display
unsigned int connector_count,
>> @@ -844,6 +873,7 @@ int drm_client_modeset_probe(struct drm_client_dev
>> *client, unsigned int width,
>> memset(crtcs, 0, connector_count * sizeof(*crtcs));
>> memset(offsets, 0, connector_count * sizeof(*offsets));
>>
>> + drm_client_match_edp_lid(dev, connectors, connector_count,
>> enabled);
>> if (!drm_client_target_cloned(dev, connectors,
>> connector_count, modes,
>> offsets, enabled, width,
>> height) &&
>> !drm_client_target_preferred(dev, connectors,
>> connector_count, modes,
>> --
>> 2.43.0
>>
--
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
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
I'm sending these together, as they're related, and almost identical,
but I expect them to be merged individually to each driver.
BR,
Jani.
Jani Nikula (3):
drm/i915: drop redundant W=1 warnings from Makefile
drm/xe: drop redundant W=1 warnings from Makefile
drm/amdgpu: drop red
.extrawarn.
Signed-off-by: Jani Nikula
---
drivers/gpu/drm/amd/amdgpu/Makefile | 18 +-
1 file changed, 1 insertion(+), 17 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/Makefile
b/drivers/gpu/drm/amd/amdgpu/Makefile
index 1f6b56ec99f6..9508d0b5708e 100644
--- a/drivers/gpu/drm/
"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: nouv...@lists.freedesktop.org
---
drivers/gpu/drm/n
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
.extrawarn.
Signed-off-by: Jani Nikula
---
drivers/gpu/drm/i915/Makefile | 25 +
1 file changed, 1 insertion(+), 24 deletions(-)
diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile
index 7cad944b825c..a70d95a8fd7a 100644
--- a/drivers/gpu/drm/i915/Make
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
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-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
---
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.
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
.extrawarn.
Signed-off-by: Jani Nikula
---
drivers/gpu/drm/xe/Makefile | 25 +
1 file changed, 1 insertion(+), 24 deletions(-)
diff --git a/drivers/gpu/drm/xe/Makefile b/drivers/gpu/drm/xe/Makefile
index c9f067b8f54d..f4366cb958be 100644
--- a/drivers/gpu/drm/xe/Makefile
+++ b/d
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_hdm
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
>
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-gfx@lists.freedesktop.org
Signed-off-by: Jani Nikula
---
drivers/gpu/drm
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
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
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
Cc: Danilo Krummrich
Cc: nouv...@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
using it.
Cc: Alex Deucher
Cc: Christian König
Cc: Pan, Xinhui
Cc: amd-gfx@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
using it.
Cc: Alex Deucher
Cc: Christian König
Cc: Pan, Xinhui
Cc: amd-gfx@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
code in a while but this all looks pretty
>> >> straightforward and good.
>> >>
>> >> Reviewed-by: Harry Wentland
>> >
>> > Hmmm, that was three weeks ago, but it seems since then nothing
>> > happened to fix the linked regression
Signed-off-by: Ville Syrjälä
FWIW,
Reviewed-by: Jani Nikula
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 8 ++--
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
> 2 files changed, 3 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/am
t;> > 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 wi
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
&
/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
1 - 100 of 325 matches
Mail list logo