able.
>>
>> Global data structures marked 'const' will be moved into an ELF
>> section that is typically mapped read-only in its entirely, and so the
>> data cannot be modified by writing to it directly. No such protection
>> is possible for the stack, and so the constness there is only enforced
>> at compile time.
> I completely agree with you. No reason to use const within those
> functions. But why define those ctl_tables in function to begin with.
> Can't you just use the ones that are defined outside the functions?
You could have static const within functions too. You get the rodata
protection and function local scope, best of both worlds?
BR,
Jani.
--
Jani Nikula, Intel
On Thu, 23 Jan 2025, Gustavo Sousa wrote:
> Quoting Jani Nikula (2025-01-23 12:14:31-03:00)
>>On Thu, 23 Jan 2025, Jani Nikula wrote:
>>> From: Gustavo Sousa
>>>
>>> The header drm_print.h uses members of struct drm_device pointers, as
>>> su
On Thu, 23 Jan 2025, Simona Vetter wrote:
> On Thu, Jan 23, 2025 at 05:09:10PM +0200, Jani Nikula wrote:
>> The expectation is that the struct drm_device based logging helpers get
>> passed an actual struct drm_device pointer rather than some random
>> struct pointer where yo
On Fri, 24 Jan 2025, "Andy Yan" wrote:
> Hi,
>
> At 2025-01-23 23:09:09, "Jani Nikula" wrote:
>>The expectation is that the struct drm_device based logging helpers get
>>passed an actual struct drm_device pointer rather than some random
>>struct poi
On Thu, 23 Jan 2025, Jani Nikula wrote:
> From: Gustavo Sousa
>
> The header drm_print.h uses members of struct drm_device pointers, as
> such, it should include drm_device.h to let the compiler know the full
> type definition.
>
> Without such include, users of drm_print.h
On Thu, 23 Jan 2025, Jani Nikula wrote:
> On Thu, 23 Jan 2025, Damon Ding wrote:
>> According to the comments in include/drm/drm_print.h, the DRM_...()
>> functions are deprecated in favor of drm_...() or dev_...() functions.
>>
>> Use drm_err()/drm_dbg_core
fit being the type checking of the macro
argument.
As a side effect, this also reduces macro argument double references.
Signed-off-by: Jani Nikula
---
include/drm/drm_print.h | 41 +++--
1 file changed, 23 insertions(+), 18 deletions(-)
diff --git a/include/
s and be forced to include the
latter.
Signed-off-by: Gustavo Sousa
Reviewed-by: Jani Nikula
---
Including here as a dependency. May be merged independently.
---
include/drm/drm_print.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/drm/drm_print.h b/include/drm/drm_print.h
ge, as struct drm_device is not
available, but drops "[drm]" or "[drm] *ERROR*" prefix from logging.
Unfortunately, there's no dev_WARN_ON(), so the conversion is not
exactly the same.
Signed-off-by: Jani Nikula
---
Cc: Matthew Brost
Cc: Danilo Krummrich
Cc: Philip
"[drm] *ERROR*" prefix from logging.
Signed-off-by: Jani Nikula
---
Looks like it's possible to hunt down the struct drm_device in most of
these cases, if that's desired. This was the simplest change.
Cc: Sandy Huang
Cc: "Heiko Stübner"
Cc: Andy Yan
Cc: dri-d
Fix all cases that pass something other than struct drm_device to the
drm_device based logging helpers, and add strict type checking.
Gustavo Sousa (1):
drm/print: Include drm_device.h
Jani Nikula (4):
drm/mipi-dsi: stop passing non struct drm_device to drm_err() and
friends
drm
struct drm_device is not available, but drops "[drm]
*ERROR*" from logs.
Signed-off-by: Jani Nikula
---
Cc: Maarten Lankhorst
Cc: Maxime Ripard
Cc: Thomas Zimmermann
Cc: dri-devel@lists.freedesktop.org
---
drivers/gpu/drm/drm_mipi_dsi.c | 12 ++--
1 file changed, 6 insertions
property\n");
>>> + dev_err(dev, "failed to get pclk property\n");
>>> return PTR_ERR(dp->pclk);
>>> }
>>>
>>> dp->rst = devm_reset_control_get(dev, "dp");
>>> if (IS_ERR(dp->rst)) {
>>> - DRM_DEV_ERROR(dev, "failed to get dp reset control\n");
>>> + dev_err(dev, "failed to get dp reset control\n");
>>> return PTR_ERR(dp->rst);
>>> }
>>>
>>> @@ -315,12 +316,12 @@ static int rockchip_dp_drm_create_encoder(struct
>>> rockchip_dp_device *dp)
>>>
>>> encoder->possible_crtcs = drm_of_find_possible_crtcs(drm_dev,
>>> dev->of_node);
>>> - DRM_DEBUG_KMS("possible_crtcs = 0x%x\n", encoder->possible_crtcs);
>>> + drm_dbg_kms(drm_dev, "possible_crtcs = 0x%x\n",
>>> encoder->possible_crtcs);
>>>
>>> ret = drm_simple_encoder_init(drm_dev, encoder,
>>> DRM_MODE_ENCODER_TMDS);
>>> if (ret) {
>>> - DRM_ERROR("failed to initialize encoder with drm\n");
>>> + drm_err(drm_dev, "failed to initialize encoder with drm\n");
>>> return ret;
>>> }
>>>
>>> @@ -340,7 +341,7 @@ static int rockchip_dp_bind(struct device *dev, struct
>>> device *master,
>>>
>>> ret = rockchip_dp_drm_create_encoder(dp);
>>> if (ret) {
>>> - DRM_ERROR("failed to create drm encoder\n");
>>> + drm_err(drm_dev, "failed to create drm encoder\n");
>>> return ret;
>>> }
>>>
>>> --
>>> 2.34.1
>>>
>
> Best regards,
> Damon
--
Jani Nikula, Intel
(dp->rst);
> }
>
> @@ -315,12 +316,12 @@ static int rockchip_dp_drm_create_encoder(struct
> rockchip_dp_device *dp)
>
> encoder->possible_crtcs = drm_of_find_possible_crtcs(drm_dev,
> dev->of_node);
> - DRM_DEBUG_KMS("possible_crtcs = 0x%x\n", encoder->possible_crtcs);
> + drm_dbg_kms(dp, "possible_crtcs = 0x%x\n", encoder->possible_crtcs);
>
> ret = drm_simple_encoder_init(drm_dev, encoder,
> DRM_MODE_ENCODER_TMDS);
> if (ret) {
> - DRM_ERROR("failed to initialize encoder with drm\n");
> + drm_err(dp, "failed to initialize encoder with drm\n");
> return ret;
> }
>
> @@ -340,7 +341,7 @@ static int rockchip_dp_bind(struct device *dev, struct
> device *master,
>
> ret = rockchip_dp_drm_create_encoder(dp);
> if (ret) {
> - DRM_ERROR("failed to create drm encoder\n");
> + drm_err(dp, "failed to create drm encoder\n");
> return ret;
> }
--
Jani Nikula, Intel
this results in a boilerplate code which compares
> returned value with the size.
>
> Implement new set of DPCD access helpers, which ignore partial access,
> always return 0 or an error code. Implement existing helpers using the
> new functions to ensure backwards compatibility.
&g
hat only checked for < 0
with the old functions.
I glanced through the series, I didn't spot anything obviously wrong,
but didn't do a thorough review either. I can do once we have wider
buy-in for the idea in general, so the effort won't be wasted.
For now,
Acked-by:
= drm_dp_dpcd_write_data(aux_dev->aux, pos, buf, todo);
> if (res <= 0)
> break;
>
> - pos += res;
> + pos += todo;
> }
>
> if (pos != iocb->ki_pos)
--
Jani Nikula, Intel
eframe commit message [Arun]
>
> --v3
> -Move the function to drm_core [Dmitry/Jani]
>
> Spec: DP v2.1 Section 3.6.12.3
> Signed-off-by: Suraj Kandpal
> Reviewed-by: Arun R Murthy
Acked-by: Jani Nikula
for merging this via drm-misc-next along with the rest of the serie
; - task_pid_vnr(i915->display.access.allowed_task));
>> > - get_task_comm(comm, display->access.allowed_task),
>> > ++ display->access.allowed_task->comm,
>> > + task_pid_vnr(display->access.allowed_task));
>> >
>> > - drm_dbg_kms(&i915->drm,
>> > + drm_dbg_kms(display->drm,
>> >"Reject display access from task %s (allowed to %s)\n",
>> >current_task, allowed_task);
>> >
>>
>> This is now a conflict between the drm tree and the mm-nonmm-unstable
>> branch of the mm tree.
>
> And now a conflict between Linus' tree and the mm-nonmm-stable tree.
Will be taken care of with backmerges after -rc1.
BR,
Jani.
--
Jani Nikula, Intel
On Wed, 22 Jan 2025, Gustavo Sousa wrote:
> Quoting Jani Nikula (2025-01-22 11:02:31-03:00)
>>On Wed, 22 Jan 2025, Gustavo Sousa wrote:
>>> Quoting Simona Vetter (2025-01-22 08:11:53-03:00)
>>>>On Tue, Jan 21, 2025 at 06:09:25PM -0300, Gustavo Sousa wrote:
>
Yamada
Acked-by: Thomas Zimmermann
Signed-off-by: Jani Nikula
---
Kbuild | 1 +
drivers/gpu/drm/Kconfig | 11 +++
drivers/gpu/drm/Makefile | 18 ++
include/Kbuild | 1 +
include/drm/Makefile | 18 ++
5 files changed, 49
drm_client_event.h uses bool without types.h, include it.
Fixes: bf17766f1083 ("drm/client: Move suspend/resume into DRM client
callbacks")
Cc: Thomas Zimmermann
Signed-off-by: Jani Nikula
---
include/drm/drm_client_event.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/i
Add CONFIG_DRM_HEADER_TEST to ensure drm headers are self-contained and
pass kernel-doc. And for starters, fix one header that this catches.
Jani Nikula (2):
drm/client: include types.h to make drm_client_event.h self-contained
drm: ensure drm headers are self-contained and pass kernel-doc
round without
dereferencing. It's the dereferencing in the macros that could fail the
build if the .c using them doesn't include drm_device.h.
To balance things out, I think we could probably drop drm/drm.h if we
inlined one use of DRM_NAME to just "drm".
BR,
Jani.
>>-Sima
>>
>>>
>>> struct debugfs_regset32;
>>> struct drm_device;
>>> --
>>> 2.48.1
>>>
>>
>>--
>>Simona Vetter
>>Software Engineer, Intel Corporation
>>http://blog.ffwll.ch
--
Jani Nikula, Intel
It's not a nice catch. It's wrong [1].
BR,
Jani.
[1] https://lore.kernel.org/r/87cyglg9w2@intel.com
>
> Krzysztof
>
>> return NULL;
>>
>> intel_engine_pm_get(ce->engine);
>> --
>> 2.34.1
>>
--
Jani Nikula, Intel
IOS fb too small (%dx%d), we require (%dx%d),"
> + "BIOS fb dimensions mismatch (%dx%d), we require
> (%dx%d),"
> " releasing it\n",
> fb->base.width, fb->base.height,
> sizes->fb_width, sizes->fb_height);
--
Jani Nikula, Intel
own.
> Analyzed-by: Linus Torvalds
> Suggested-by: Linus Torvalds
> Suggested-by: David Laight
> Cc: David Laight
> Cc: Jani Nikula
> Cc: Andy Shevchenko
> Signed-off-by: Guenter Roeck
> ---
> drivers/gpu/drm/i915/display/intel_backlight.c | 7 +--
> 1 fil
te->uapi.visible &&
> + if (fb && new_plane_state->uapi.visible &&
> intel_format_info_is_yuv_semiplanar(fb->format, fb->modifier)) {
> new_crtc_state->data_rate_y[plane->id] =
> intel_plane_data_rate(new_crtc_state, new_plane_state,
> 0);
--
Jani Nikula, Intel
truct intel_context *gen8_ggtt_bind_get_ce(struct
> i915_ggtt *ggtt, intel
> * doing rpm_resume().
>*/
> *wakeref = intel_gt_pm_get_if_awake(gt);
> - if (!*wakeref)
> + if (!*wakeref || *wakeref == INTEL_WAKEREF_DEF)
> return NULL;
>
> intel_engine_pm_get(ce->engine);
--
Jani Nikula, Intel
support to cover modes that aren't supported by
>> earlier standards (e.g. CVT). So, parse all of the relevant VFDB data
>> and feed it to the OVT Algorithm, to extract all of the missing OVT
>> modes.
>>
>> Cc: Ian Forbes
>> Cc: Jani Nikula
>> Suggested
> 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
; };
>
> static const struct intel_dpcd_quirk intel_dpcd_quirks[] = {
> diff --git a/drivers/gpu/drm/i915/display/intel_quirks.h
> b/drivers/gpu/drm/i915/display/intel_quirks.h
> index cafdebda75354..9e8f2816a4fba 100644
> --- a/drivers/gpu/drm/i915/display/intel_quirks.h
> +++ b/drivers/gpu/drm/i915/display/intel_quirks.h
> @@ -20,6 +20,7 @@ enum intel_quirk_id {
> QUIRK_LVDS_SSC_DISABLE,
> QUIRK_NO_PPS_BACKLIGHT_POWER_HOOK,
> QUIRK_FW_SYNC_LEN,
> + QUIRK_SKIP_LINK_CHECK,
> };
>
> void intel_init_quirks(struct intel_display *display);
--
Jani Nikula, Intel
>>
>> And it easily breaks tools that tries to track where backports went and
>> if they are needed elsewhere, which ends up missing things because of
>> this crazy workflow. So in the end, it's really only hurting YOUR
>> subsystem because of this.
>>
>> And yes, there is a simple way to fix this, DO NOT TAG COMMITS THAT ARE
>> DUPLICATES AS FOR STABLE. Don't know why you all don't do that, would
>> save a world of hurt.
>>
>> I'm tired of it, please, just stop. I am _this_ close to just ignoring
>> ALL DRM patches for stable trees...
>>
>> greg k-h
--
Jani Nikula, Intel
On Mon, 13 Jan 2025, Maxime Ripard wrote:
> The DRM and KMS frameworks and helpers gain more and more kunit
> coverage, so let's document what our expectations are.
>
> Suggested-by: Jani Nikula
> Signed-off-by: Maxime Ripard
Seems fair.
Acked-by: Jani Nikula
---
On a
0009cd8d505bd545...@google.com/T/
Seems to me in most cases we do want the WARN, but there are corner
cases. Arguably those should be addressed instead to ensure we won't
ignore the real bugs. We want the warning, you want the panic.
BR,
Jani.
--
Jani Nikula, Intel
truth to have "S: Odd Fixes"
either. And the extreme would be to just remove the whole maintainers
entry and have it fall back to the i915 entry.
Thoughts?
BR,
Jani.
[1] https://github.com/intel/gvt-linux/
[2] https://lists.freedesktop.org/archives/intel-gvt-dev/
--
Jani Nikula, Intel
&i915_perf_stream_paranoid,
For i915,
Acked-by: Jani Nikula
--
Jani Nikula, Intel
On Thu, 05 Dec 2024, Laurent Pinchart wrote:
> On Thu, Dec 05, 2024 at 05:03:00PM +0200, Jani Nikula wrote:
>> Building with clang and and W=1 leads to warning about unused
>> rcar_cmm_read(). Fix by annotating it with __maybe_unused.
>>
>> See also commit 6863f5643d
>> OK, so commits ae78ec0a52c4 and 493454445c95 were merged in commit
>>
>> 8f109f287fdc ("Merge drm/drm-next into drm-xe-next")
>>
>> but include/drm/intel/xe_pciids.h was not deleted (it is not longer
>> referenced anywhere in the tree) and the above patch was not applied :-(
>>
>> Since then that part of the drm-xe tree has been merged into the drm
>> tree in commit
>>
>> bdecb30d579e ("Merge tag 'drm-xe-next-2024-12-11' of
>> https://gitlab.freedesktop.org/drm/xe/kernel into drm-next")
>>
>> So, include/drm/intel/xe_pciids.h needs to be removed from the drm tree
>> and the above patch applied there.
>
> Ping?
Thanks for the ping. See [1].
BR,
Jani.
[1] https://lore.kernel.org/r/20250109105032.2585416-1-jani.nik...@intel.com
--
Jani Nikula, Intel
On Thu, 02 Jan 2025, Imre Deak wrote:
> On Thu, Dec 19, 2024 at 11:34:05PM +0200, Jani Nikula wrote:
>> Enable basic 128b/132b SST functionality without compression. Reuse
>> intel_dp_mtp_tu_compute_config() to figure out the TU after we've
>> determined we need to use
On Thu, 02 Jan 2025, Imre Deak wrote:
> On Thu, Dec 19, 2024 at 11:34:02PM +0200, Jani Nikula wrote:
>> We'll want to distinguish 128b/132b SST and MST modes at state
>> readout. There's a catch, though. From the hardware perspective,
>> 128b/132b SST and MST progr
On Thu, 02 Jan 2025, Luca Ceresoli wrote:
> Hello Jani,
>
> thanks for your review.
>
> On Tue, 31 Dec 2024 13:11:31 +0200
> Jani Nikula wrote:
>
>> On Tue, 31 Dec 2024, Luca Ceresoli wrote:
>> > DRM bridges are currently considered as a fixed element of a DR
On Thu, 02 Jan 2025, Jani Nikula wrote:
> The struct drm_dp_mst_topology_mgr *mgr parameter is only used for debug
> logging in case the passed in link rate or lane count are zero. There's
> no further error checking as such, and the function returns 0.
>
> There should
On Tue, 31 Dec 2024, Imre Deak wrote:
> On Thu, Dec 19, 2024 at 11:33:59PM +0200, Jani Nikula wrote:
>> Write the payload allocation table for 128b/132b SST. Use VCPID 1 and
>> start from slot 0, with dp_m_n.tu slots.
>>
>> This is preparation for enabling 128b
On Tue, 31 Dec 2024, Imre Deak wrote:
> On Thu, Dec 19, 2024 at 11:33:56PM +0200, Jani Nikula wrote:
>> Handle 128b/132b SST in intel_dp_mtp_tu_compute_config(). The remote
>> bandwidth overhead and time slot allocation are only relevant for MST;
>> SST only needs the local
On Tue, 31 Dec 2024, Imre Deak wrote:
> On Thu, Dec 19, 2024 at 11:33:55PM +0200, Jani Nikula wrote:
>> Extract intel_dp_mtp_tu_compute_config() for figuring out the TU. Move
>> the link configuration and mst state access to the callers. This will be
>> easier to adapt to 128
nnecessary (Imre)
Cc: Imre Deak
Cc: Lyude Paul
Reviewed-by: Imre Deak
Signed-off-by: Jani Nikula
---
drivers/gpu/drm/display/drm_dp_mst_topology.c | 10 ++
drivers/gpu/drm/i915/display/intel_dp_mst.c| 3 +--
drivers/gpu/drm/nouveau/dispnv50/disp.c| 3 +--
drivers/gpu
On Tue, 31 Dec 2024, Imre Deak wrote:
> On Thu, Dec 19, 2024 at 11:34:00PM +0200, Jani Nikula wrote:
>> Write the DP2 specific VFREQ registers.
>>
>> This is preparation for enabling 128b/132b SST. This path is not
>> reachable yet.
>>
>> Signed-off-by:
_bridge (must be != NULL)
> + *
> + * Helper to put a DRM bridge (whose pointer is passed), but only after
> + * setting its pointer to NULL. Useful for drivers having struct drm_bridge
> + * pointers they need to dispose of, without leaving a use-after-free
> + * window where the pointed bridge might have been freed while still
> + * holding a pointer to it.
> + *
> + * For example a driver having this private struct::
> + *
> + * struct my_bridge {
> + * struct drm_bridge *remote_bridge;
> + * ...
> + * };
> + *
> + * can dispose of remote_bridge using::
> + *
> + * drm_bridge_put_and_clear(my_bridge->remote_bridge);
> + */
> +#define drm_bridge_put_and_clear(br_ptr) do { \
> + struct drm_bridge **brpp = &(br_ptr); \
> + struct drm_bridge *brp = *brpp; \
> + *brpp = NULL; \
> + drm_bridge_put(brp); \
> +} while (0)
> +
> +int drm_bridge_init(struct device *dev,
> + struct drm_bridge *bridge,
> + const struct drm_bridge_funcs *funcs);
> void drm_bridge_add(struct drm_bridge *bridge);
> int devm_drm_bridge_add(struct device *dev, struct drm_bridge *bridge);
> void drm_bridge_remove(struct drm_bridge *bridge);
--
Jani Nikula, Intel
On Mon, 30 Dec 2024, Dmitry Baryshkov wrote:
> On Mon, Dec 30, 2024 at 03:18:35PM +0200, Jani Nikula wrote:
>> On Thu, 26 Dec 2024, Abel Vesa wrote:
>> > On 24-12-11 15:42:27, Johan Hovold wrote:
>> >> On Wed, Dec 11, 2024 at 03:
On Tue, 17 Dec 2024, Jani Nikula wrote:
> Having cec.h include linux/debugfs.h leads to all users of all cec
> headers include and depend on debugfs.h and its dependencies for no
> reason. Drop the include from cec.h, and include debugfs.h and
> seq_file.h where needed.
>
> Sor
his
> doesn't happen would just make the implementation more ugly without any
> benefit, IMO.
>
>>
>> > + return 0;
>>
>> I'd check for errors instead of success here and do the rollback before
>> returning -EINVAL.
>>
>
> Yes, I think it would
t probe, we'll have to
trust the GOP has only enabled SST.
TODO: Not sure how this *or* our current code handles 128b/132b enabled
by GOP.
Cc: Imre Deak
Cc: Ville Syrjälä
Signed-off-by: Jani Nikula
---
drivers/gpu/drm/i915/display/intel_ddi.c | 29 +++-
1 file chang
128b/1232b SST will have mst_master_transcoder set and matching
cpu_transcoder. Ensure disable also for 128b/132b SST.
Co-developed-by: Imre Deak
Signed-off-by: Imre Deak
Signed-off-by: Jani Nikula
---
drivers/gpu/drm/i915/display/intel_ddi.c | 4 +++-
1 file changed, 3 insertions(+), 1
We'll only ever get here in MST mode from MST stream encoders; the
primary encoder's ->get_config() won't be called when we've detected
it's MST.
v2: Read mst_master_transcoder in 128b/132b SST path (Imre)
Signed-off-by: Jani Nikula
---
drivers/gpu/drm/i
" for 128b/132b link.
v2: mst_master_transcoder, enhanced framing (Imre)
Signed-off-by: Jani Nikula
---
drivers/gpu/drm/i915/display/intel_dp.c | 34 +
1 file changed, 24 insertions(+), 10 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c
b/dri
Add ACT handling for 128b/132b SST.
This is preparation for enabling 128b/132b SST. This path is not
reachable yet.
Signed-off-by: Jani Nikula
---
drivers/gpu/drm/i915/display/intel_ddi.c | 13 +
1 file changed, 13 insertions(+)
diff --git a/drivers/gpu/drm/i915/display
Write the DP2 specific VFREQ registers.
This is preparation for enabling 128b/132b SST. This path is not
reachable yet.
Signed-off-by: Jani Nikula
---
drivers/gpu/drm/i915/display/intel_ddi.c | 12
1 file changed, 12 insertions(+)
diff --git a/drivers/gpu/drm/i915/display
Write the payload allocation table for 128b/132b SST. Use VCPID 1 and
start from slot 0, with dp_m_n.tu slots.
This is preparation for enabling 128b/132b SST. This path is not
reachable yet. Indeed, we don't yet compute TU for 128b/132b SST.
Signed-off-by: Jani Nikula
---
drivers/gpu/drm
It's not very clearly specified, and the hardware bit is ill-named, but
128b/132b SST also needs the MST mode set in the DP_TP_CTL register.
This is preparation for enabling 128b/132b SST. This path is not
reachable yet.
Signed-off-by: Jani Nikula
---
drivers/gpu/drm/i915/display/intel_
128b/132b SST needs 128b/132b mode enabled in the TRANS_DDI_FUNC_CTL
register.
This is preparation for enabling 128b/132b SST. This path is not
reachable yet.
v2: Use the MST path instead of SST to also set transport select (Imre)
Signed-off-by: Jani Nikula
---
drivers/gpu/drm/i915/display
Handle 128b/132b SST in intel_dp_mtp_tu_compute_config(). The remote
bandwidth overhead and time slot allocation are only relevant for MST;
SST only needs the local bandwidth and a check that 64 slots isn't
exceeded.
Signed-off-by: Jani Nikula
---
drivers/gpu/drm/i915/display/intel_dp_
Extract intel_dp_mtp_tu_compute_config() for figuring out the TU. Move
the link configuration and mst state access to the callers. This will be
easier to adapt to 128b/132b SST.
v2: Don't add SST stuff here yet
Signed-off-by: Jani Nikula
---
drivers/gpu/drm/i915/display/intel_dp_mst.c
The crtc_state->pbn member is only used as a temporary variable within
mst_stream_find_vcpi_slots_for_bpp(). Remove it as unnecessary.
Suggested-by: Imre Deak
Signed-off-by: Jani Nikula
---
drivers/gpu/drm/i915/display/intel_display_types.h | 2 --
drivers/gpu/drm/i915/display/intel_dp_ms
y the callers.
There's a pointless ret local variable that we can drop in the process.
Signed-off-by: Jani Nikula
---
drivers/gpu/drm/i915/display/intel_dp_mst.c | 52 +++--
1 file changed, 18 insertions(+), 34 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_d
intel_dp_mst_bw_overhead() doesn't need the connector. Remove the
parameter.
Signed-off-by: Jani Nikula
---
drivers/gpu/drm/i915/display/intel_dp_mst.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c
b/drivers/gpu/drm
intel_dp_mst_compute_m_n() doesn't need the connector. Remove the
parameter.
Signed-off-by: Jani Nikula
---
drivers/gpu/drm/i915/display/intel_dp_mst.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c
b/drivers/gpu/drm
rally used as a divisor, and if we were hitting this, we'd
be seeing division by zero.
Just remove the debug logging altogether, along with the mgr parameter,
so that the function can be used in non-MST contexts without the
topology manager.
Cc: Imre Deak
Cc: Lyude Paul
Signed-off-by: J
ke with [1], we get a picture on screen with this, so it
must be perfect. Please review. :)
BR,
Jani.
[1] https://lore.kernel.org/r/cover.1734085515.git.jani.nik...@intel.com
Jani Nikula (16):
drm/mst: remove mgr parameter and debug logging from
drm_dp_get_vc_payload_bw()
drm/i915
: linux-me...@vger.kernel.org
Signed-off-by: Jani Nikula
---
v2: Rebase, update cec-pin-error-inj.c and cec-gpio.c too
Depends on commit ae19ba915eb7 ("drm/i915/display: include
media/cec-notifier.h and linux/debugfs.h where needed") in v6.13-rc1
---
drivers/media/cec/core/
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
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 Fri, 13 Dec 2024, Imre Deak wrote:
> On Thu, Dec 12, 2024 at 12:12:15PM +0200, Jani Nikula wrote:
>> On Thu, 12 Dec 2024, Imre Deak wrote:
>> > MST connectors should be initialized/registered by calling
>> > drm_connector_dynamic_init()/drm_connector_dynamic_re
In general use select only for non-visible symbols
(no prompts anywhere) and for symbols with no dependencies.
That will limit the usefulness but on the other hand avoid
the illegal configurations all over.
If kconfig warned about selecting symbols with dependencies it would be
painful for a while but eventually I think life would be easier.
BR,
Jani.
--
Jani Nikula, Intel
drm_connector function parameter pointer to intel_connector, calling
> the drm_connector pointer _connector.
>
> Suggested-by: Jani Nikula
> Signed-off-by: Imre Deak
A few issues below that should be addressed, with those fixed,
Reviewed-by: Jani Nikula
> ---
>
On Thu, 12 Dec 2024, Imre Deak wrote:
> After an error during adding an MST connector the MST port and the
> intel_connector object could be leaked, fix this up.
>
> Reviewed-by: Rodrigo Vivi
> Signed-off-by: Imre Deak
Reviewed-by: Jani Nikula
> ---
> drivers
onnector
> with one of the drm_connector_init*() functions incorrectly).
>
> Signed-off-by: Imre Deak
Reviewed-by: Jani Nikula
> ---
> drivers/gpu/drm/drm_connector.c | 6 +-
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_connec
> Cc: Lyude Paul
> Cc: Danilo Krummrich
> Signed-off-by: Imre Deak
Reviewed-by: Jani Nikula
> ---
> drivers/gpu/drm/nouveau/dispnv50/disp.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c
> b/drivers/g
gt; Cc: Leo Li
> Cc: Wayne Lin
> Cc: Alex Deucher
> Cc: Lyude Paul
> Signed-off-by: Imre Deak
Reviewed-by: Jani Nikula
> ---
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/dr
which moves adding the connector to the
> connector list only later when calling
> drm_connector_dynamic_register().
>
> Cc: Lyude Paul
> Reviewed-by: Rodrigo Vivi (v1)
> Signed-off-by: Imre Deak
Reviewed-by: Jani Nikula
> ---
> drivers/gpu/drm/i915/displa
ningless after this has been
committed.
Reviewed-by: Jani Nikula
> current drm_connector_init*()/drm_connector_register() interface for
> MST connectors.
>
> Based on the above adjust here the registration part and change the
> initialization part in follow-up patches for eac
tor_register()/
> unregister() for static connectors, both of which should be a nop
> for them and hence are scheduled to be removed. Update the function
> documentation for these functions accordingly.
Typo *deprecation in subject, nitpick inline,
Reviewed-by: Jani Nikula
>
&g
;
> The fix would require a bigger change, not the topic of this patchset,
> so adding only a FIXME comment here.
References to "this patchset" become meaningless after this has been
committed.
Reviewed-by: Jani Nikula
>
> Suggested-by: Simona Vetter
> Signed-off
nnector_dynamic_init().
> (Sima)
> - Instead of exporting drm_connector_add(), move adding the connector
> to the registration step via a new drm_connector_dynamic_register().
> (Sima)
> - Update drm_connector_dynamic_init()'s function documentation and the
> commit log according to
driver currently uses, but why not
>> EXPORT_SYMBOL_GPL?
>
> $ git grep EXPORT_SYMBOL drivers/gpu/drm/*.c | wc -l
> 962
> $ git grep EXPORT_SYMBOL_GPL drivers/gpu/drm/*.c | wc -l
> 93
It's even more tilted under display/.
BR,
Jani.
--
Jani Nikula, Intel
On Thu, 05 Dec 2024, Andi Shyti wrote:
> Hi Jani,
>
> On Thu, Dec 05, 2024 at 11:49:33AM +0200, Jani Nikula wrote:
>> Add a helper to print a hex dump to a struct drm_printer. There's no
>> fancy formatting stuff, just 16 space-separated bytes per line, with an
>>
On Tue, 10 Dec 2024, Genes Lists wrote:
> On Tue, 2024-12-10 at 10:58 +0200, Jani Nikula wrote:
>> On Tue, 10 Dec 2024, Sakari Ailus
>> wrote:
>> > Hi,
>> >
>> > > ...
>> > > FYI 6.12.4 got a crash shortly after booting in dma_alloc_a
On Thu, 05 Dec 2024, Jani Nikula wrote:
> Add a helper to print a hex dump to a struct drm_printer. There's no
> fancy formatting stuff, just 16 space-separated bytes per line, with an
> optional prefix.
drm-misc maintainers, ack for merging this via drm-intel-next?
BR,
Jani.
Building with clang and and W=1 leads to warning about unused
hdmi_read(). Fix by annotating it with __maybe_unused.
See also commit 6863f5643dd7 ("kbuild: allow Clang to find unused static
inline functions for W=1 build").
Signed-off-by: Jani Nikula
---
Cc: Andrzej Hajda
Cc: Neil
Building with clang and and W=1 leads to warning about unused
rcar_cmm_read(). Fix by annotating it with __maybe_unused.
See also commit 6863f5643dd7 ("kbuild: allow Clang to find unused static
inline functions for W=1 build").
Signed-off-by: Jani Nikula
---
Cc: Laurent Pinchart
v2 of [1]. Dropped the parts that have already been fixed. No other
changes. Hoping to get this merged soon.
BR,
Jani.
[1] https://lore.kernel.org/r/cover.1725962479.git.jani.nik...@intel.com
Jani Nikula (3):
drm/bridge: dw-hdmi-i2s: annotate hdmi_read() with __maybe_unused
drm: renesas
r # build
Signed-off-by: Jani Nikula
---
drivers/gpu/drm/Makefile | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
index 1677c1f335fb..73b3b3dbc27e 100644
--- a/drivers/gpu/drm/Makefile
+++ b/drivers/gpu/drm/Makefile
@@ -19,6 +19,9 @@ subdir
On Fri, 29 Nov 2024, Hans Verkuil wrote:
> On 29/11/2024 09:24, Jani Nikula wrote:
>> On Wed, 27 Nov 2024, Jani Nikula wrote:
>>> Cc: Hans Verkuil
>
> That email no longer exists. Just use hverk...@xs4all.nl or
> hansv...@cisco.com, either works, but I prefer my priv
On Thu, 05 Dec 2024, Andi Shyti wrote:
> Hi Jani,
>
> On Thu, Dec 05, 2024 at 11:49:34AM +0200, Jani Nikula wrote:
>> Use the drm_printer based printer to get the device specific printing of
>> the hex dump.
>>
>> Signed-off-by: Jani Nikula
>
> ...
>
&
On Wed, 04 Dec 2024, Jani Nikula wrote:
> Resend, crunched this through more configs enabled to be sure.
>
> BR,
> Jani.
>
>
>
> Jani Nikula (3):
> drm/xen: remove redundant initialization info print
> accel/ivpu: remove DRIVER_DATE conditional drm_driver init
&g
Use the drm_printer based printer to get the device specific printing of
the hex dump, and avoid the manual loglevel hacking.
Signed-off-by: Jani Nikula
---
drivers/gpu/drm/i915/display/intel_display.c | 17 ++---
1 file changed, 2 insertions(+), 15 deletions(-)
diff --git a
Use the drm_printer based printer to get the device specific printing of
the hex dump.
Signed-off-by: Jani Nikula
---
.../gpu/drm/i915/display/intel_crtc_state_dump.c | 14 ++
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/drivers/gpu/drm/i915/display
Add a hex dumper for drm_printer, and use it to simplify hex dumping in
i915.
Jani Nikula (3):
drm/print: add drm_print_hex_dump()
drm/i915/display: use drm_print_hex_dump() for crtc state dump
drm/i915/display: use drm_print_hex_dump() for buffer mismatch dumps
drivers/gpu/drm
Add a helper to print a hex dump to a struct drm_printer. There's no
fancy formatting stuff, just 16 space-separated bytes per line, with an
optional prefix.
Signed-off-by: Jani Nikula
---
drivers/gpu/drm/drm_print.c | 23 +++
include/drm/drm_print.h | 2 ++
2
1 - 100 of 2162 matches
Mail list logo