[PATCH] drm/amdgpu: resove reboot exception for si oland

2023-03-09 Thread Zhenneng Li
During reboot test on arm64 platform, it may failure on boot. The error message are as follows: [6.996395][ 7] [ T295] [drm:amdgpu_device_ip_late_init [amdgpu]] *ERROR* late_init of IP block failed -22 [7.006919][ 7] [ T295] amdgpu :04:00.0: amdgpu_device

[PATCH] drm/amdgpu: resove reboot exception for si oland

2023-03-09 Thread Zhenneng Li
During reboot test on arm64 platform, it may failure on boot. The error message are as follows: [6.996395][ 7] [ T295] [drm:amdgpu_device_ip_late_init [amdgpu]] *ERROR* late_init of IP block failed -22 [7.006919][ 7] [ T295] amdgpu :04:00.0: amdgpu_device

[PATCH v1] drm/mipi-dsi: Set the fwnode for mipi_dsi_device

2023-03-09 Thread Saravana Kannan
After commit 3fb16866b51d ("driver core: fw_devlink: Make cycle detection more robust"), fw_devlink prints an error when consumer devices don't have their fwnode set. This used to be ignored silently. Set the fwnode mipi_dsi_device so fw_devlink can find them and properly track their dependencies.

Re: [PATCH RFC 01/18] rust: drm: ioctl: Add DRM ioctl abstraction

2023-03-09 Thread Asahi Lina
On 10/03/2023 05.39, Karol Herbst wrote: > On Thu, Mar 9, 2023 at 9:24 PM Faith Ekstrand > wrote: >> >> On Thu, 2023-03-09 at 15:04 +0900, Asahi Lina wrote: >>> On 08/03/2023 02.34, Björn Roy Baron wrote: > +// SAFETY: This is just the ioctl > argument, which ho

RE: [Intel-gfx] [PATCH v6 02/10] drm/hdcp: Avoid changing crtc state in hdcp atomic check

2023-03-09 Thread Kandpal, Suraj
> -Original Message- > From: Intel-gfx On Behalf Of Mark > Yacoub > Sent: Thursday, January 19, 2023 1:00 AM > To: quic_khs...@quicinc.com; linux-arm-...@vger.kernel.org; dri- > de...@lists.freedesktop.org; freedr...@lists.freedesktop.org; > devicet...@vger.kernel.org; linux-ker...@vger

RE: [Intel-gfx] [PATCH v6 01/10] drm/hdcp: Add drm_hdcp_atomic_check()

2023-03-09 Thread Kandpal, Suraj
> > From: Sean Paul > > This patch moves the hdcp atomic check from i915 to drm_hdcp so other > drivers can use it. No functional changes, just cleaned up some of the code > when moving it over. > > Acked-by: Jani Nikula > Acked-by: Jani Nikula > Reviewed-by: Rodrigo Vivi > Reviewed-by: Abhi

[git pull] drm fixes for 6.3-rc2

2023-03-09 Thread Dave Airlie
Hi Linus, Weekly fixes, msm and amdgpu are the vast majority of these, otherwise some straggler misc from last week for nouveau and cirrus and a mailmap update for a drm developer. Regards, Dave. drm-fixes-2023-03-10: drm fixes for 6.3-rc2 mailmap - add an entry nouveau: - fix system shutdown

[PATCH] drm/bridge: Fix returned array size name for atomic_get_input_bus_fmts kdoc

2023-03-09 Thread Liu Ying
The returned array size for input formats is set through atomic_get_input_bus_fmts()'s 'num_input_fmts' argument, so use 'num_input_fmts' to represent the array size in the function's kdoc, not 'num_output_fmts'. Fixes: ("91ea83306bfa drm/bridge: Fix the bridge kernel doc") Fixes: ("f32df58acc68 d

[pull] amdgpu, amdkfd drm-fixes-6.3

2023-03-09 Thread Alex Deucher
Hi Dave, Daniel, Fixes for 6.3. Same pull as yesterday, but drop the KFD patch that caused a regression. The following changes since commit 66305069eb6d17d9190cbcd196f3f7487df47ae8: Merge tag 'drm-misc-fixes-2023-02-23' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes (2023-03-07

RE: [PATCH v3 2/2] drm/probe_helper: warning on poll_enabled for issue catching

2023-03-09 Thread Quan, Evan
[AMD Official Use Only - General] Series is acked-by: Evan Quan > -Original Message- > From: amd-gfx On Behalf Of > Guchun Chen > Sent: Friday, March 10, 2023 9:02 AM > To: amd-...@lists.freedesktop.org; dri-devel@lists.freedesktop.org; > Deucher, Alexander ; Zhang, Hawking > ; dmitry.b

Re: [PATCH 1/2] drm/i915/pmu: Use functions common with sysfs to read actual freq

2023-03-09 Thread Dixit, Ashutosh
On Thu, 09 Mar 2023 01:20:09 -0800, Tvrtko Ursulin wrote: > Hi Tvrtko, > On 09/03/2023 03:46, Ashutosh Dixit wrote: > > Expose intel_rps_read_actual_frequency_fw to read the actual freq without > > taking forcewake for use by PMU. The code is refactored to use a common set > > of functions across

[PATCH v3 2/2] drm/probe_helper: warning on poll_enabled for issue catching

2023-03-09 Thread Guchun Chen
In order to catch issues in other drivers to ensure proper call sequence of polling function. v2: drop Fixes tag in commit message Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2411 Reported-by: Bert Karwatzki Suggested-by: Dmitry Baryshkov Signed-off-by: Guchun Chen --- drivers/gpu/dr

[PATCH v3 1/2] drm/amdgpu: move poll enabled/disable into non DC path

2023-03-09 Thread Guchun Chen
Some amd asics having reliable hotplug support don't call drm_kms_helper_poll_init in driver init sequence. However, due to the unified suspend/resume path for all asics, because the output_poll_work->func is not set for these asics, a warning arrives when suspending. [ 90.656049] [ 90.65605

[PATCH 2/2] drm/i915/pmu: Remove fallback to requested freq for SLPC

2023-03-09 Thread Ashutosh Dixit
The fallback to requested freq does not work for SLPC because SLPC does not use 'struct intel_rps'. Also for SLPC requested freq can only be obtained from a hw register after acquiring forcewake which we don't want to do for PMU. Therefore remove fallback to requested freq for SLPC. The actual freq

[PATCH 1/2] drm/i915/pmu: Use functions common with sysfs to read actual freq

2023-03-09 Thread Ashutosh Dixit
Expose intel_rps_read_actual_frequency_fw to read the actual freq without taking forcewake for use by PMU. The code is refactored to use a common set of functions across sysfs and PMU. Using common functions with sysfs in PMU solves the issues of missing support for MTL and missing support for olde

[PATCH 0/2] drm/i915/pmu: Use common freq functions with sysfs

2023-03-09 Thread Ashutosh Dixit
Expose intel_rps_read_actual_frequency_fw to read the actual freq without taking forcewake for use by PMU. The code is refactored to use a common set of functions across sysfs and PMU. Using common functions with sysfs in PMU solves the issues of missing support for MTL and missing support for olde

[PATCH v5 18/32] drm/msm/dpu: rewrite plane's QoS-related functions to take dpu_sw_pipe and dpu_format

2023-03-09 Thread Dmitry Baryshkov
Rewrite dpu_plane's QoS related functions to take struct dpu_sw_pipe and struct dpu_format as arguments rather than fetching them from the pstate or drm_framebuffer. Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 98 +++

[PATCH v5 25/32] drm/msm/dpu: rework static color fill code

2023-03-09 Thread Dmitry Baryshkov
Rework static color fill code to separate the pipe / pipe_cfg handling. This is a preparation for the r_pipe support. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 69 +-- 1 file changed, 40 insertions(+), 29 deletions(-) diff --git a/driver

[PATCH v5 21/32] drm/msm/dpu: simplify dpu_plane_validate_src()

2023-03-09 Thread Dmitry Baryshkov
The plane's clipped coordinates has already been validated against FB size in the drm_atomic_plane_check(). There is no need to check them again. Remove corresponding checks and inline dpu_plane_validate_src(). Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 30 ++

[PATCH v5 19/32] drm/msm/dpu: make _dpu_plane_calc_clk accept mode directly

2023-03-09 Thread Dmitry Baryshkov
Rework bandwidth/clock calculation functions to use mode directly rather than fetching it through the plane data. Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 39 ++- 1 file changed, 17 insertions(+), 22 deletions

[PATCH v5 31/32] drm/msm/dpu: log the multirect_index in _dpu_crtc_blend_setup_pipe

2023-03-09 Thread Dmitry Baryshkov
From: Abhinav Kumar Lets print the multirect_index as well in _dpu_crtc_blend_setup_pipe() as it will give the complete information of the sw_pipe as well. Signed-off-by: Abhinav Kumar --- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff

[PATCH v5 28/32] drm/msm/dpu: populate SmartDMA features in hw catalog

2023-03-09 Thread Dmitry Baryshkov
Downstream driver uses dpu->caps->smart_dma_rev to update sspp->cap->features with the bit corresponding to the supported SmartDMA version. Upstream driver does not do this, resulting in SSPP subdriver not enabling setup_multirect callback. Add corresponding SmartDMA SSPP feature bits to dpu hw cat

[PATCH v5 30/32] drm/msm/dpu: drop smart_dma_rev from dpu_caps

2023-03-09 Thread Dmitry Baryshkov
The code doesn't use dpu_caps::smart_dma_rev field. It checks if the corresponding feature is enabled in the SSPP features. Drop the smart_dma_rev field completely. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 13 - drivers/gpu/drm/msm/disp/dpu

[PATCH v5 24/32] drm/msm/dpu: rework plane CSC setting

2023-03-09 Thread Dmitry Baryshkov
Rework the code flushing CSC settings for the plane. Separate out the pipe and pipe_cfg as a preparation for r_pipe support. Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 47 +-- 1 file changed, 27 insertions(+), 2

[PATCH v5 29/32] drm/msm/dpu: enable SmartDMA for the rest of the platforms

2023-03-09 Thread Dmitry Baryshkov
Enable SmartDMA features for the rest of the platforms where it is supposed to work. Signed-off-by: Dmitry Baryshkov --- .../gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c| 54 --- 1 file changed, 23 insertions(+), 31 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ca

[PATCH v5 32/32] drm/msm/dpu: remove unused dpu_plane_validate_multirect_v2 function

2023-03-09 Thread Dmitry Baryshkov
From: Abhinav Kumar After cleaning up the older multirect support the function dpu_plane_validate_multirect_v2() is unused. Lets remove it. Signed-off-by: Abhinav Kumar --- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 111 -- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.h | 7 -

[PATCH v5 27/32] drm/msm/dpu: add support for wide planes

2023-03-09 Thread Dmitry Baryshkov
Typically SSPP can support rectangle with width up to 2560. However it's possible to use multirect feature and split source to use the SSPP to output two consecutive rectangles. This commit brings in this capability to support wider screen resolutions. Signed-off-by: Dmitry Baryshkov --- drivers

[PATCH v5 12/32] drm/msm/dpu: remove dpu_hw_fmt_layout from struct dpu_hw_sspp_cfg

2023-03-09 Thread Dmitry Baryshkov
Remove dpu_hw_fmt_layout instance from struct dpu_hw_sspp_cfg, leaving only src_rect and dst_rect. This way all the pipes used by the plane will have a common layout instance (as the framebuffer is shared between them), while still keeping a separate src/dst rectangle configuration for each pipe.

[PATCH v5 23/32] drm/msm/dpu: rework dpu_plane_atomic_check()

2023-03-09 Thread Dmitry Baryshkov
Split pipe-dependent code from dpu_plane_atomic_check() into the separate function dpu_plane_atomic_check_pipe(). This is one of preparational steps to add r_pipe support. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 90 ++- 1 file changed,

[PATCH v5 20/32] drm/msm/dpu: add dpu_hw_sspp_cfg to dpu_plane_state

2023-03-09 Thread Dmitry Baryshkov
Now as all accesses to pipe_cfg and pstate have been cleaned, add struct dpu_hw_sspp_cfg to struct dpu_plane_state, so that dpu_plane_atomic_check() and dpu_plane_atomic_update() do not have a chance to disagree about src/dst rectangles (currently dpu_plane_atomic_check() uses unclipped rectangles,

[PATCH v5 22/32] drm/msm/dpu: rework dpu_plane_sspp_atomic_update()

2023-03-09 Thread Dmitry Baryshkov
Split pipe-dependent code from dpu_plane_sspp_atomic_update() into the separate function dpu_plane_sspp_update_pipe(). This is one of preparational steps to add r_pipe support. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 113 -- 1 file chan

[PATCH v5 26/32] drm/msm/dpu: split pipe handling from _dpu_crtc_blend_setup_mixer

2023-03-09 Thread Dmitry Baryshkov
Rework _dpu_crtc_blend_setup_mixer() to split away pipe handling to a separate functon. This is a preparation for the r_pipe support. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 79 +++- 1 file changed, 50 insertions(+), 29 deletions(-) dif

[PATCH v5 17/32] drm/msm/dpu: drop redundant plane dst check from dpu_crtc_atomic_check()

2023-03-09 Thread Dmitry Baryshkov
The helper drm_atomic_helper_check_plane_state() already checks whether the scaled and clipped plane falls into the CRTC visible region (and clears plane_state->visible if it doesn't). Drop the redundant check from dpu_crtc_atomic_check(). Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshko

[PATCH v5 15/32] drm/msm/dpu: don't use unsupported blend stages

2023-03-09 Thread Dmitry Baryshkov
The dpu_crtc_atomic_check() compares blending stage with DPU_STAGE_MAX (maximum amount of blending stages supported by the driver), however we should compare it against .max_mixer_blendstages, the maximum blend stage supported by the mixer. Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshk

[PATCH v5 16/32] drm/msm/dpu: move the rest of plane checks to dpu_plane_atomic_check()

2023-03-09 Thread Dmitry Baryshkov
Move plane state updates from dpu_crtc_atomic_check() to the function where they belong: to dpu_plane_atomic_check(). Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 18 +- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 18 ++ drivers/

[PATCH v5 09/32] drm/msm/dpu: pass dpu_format to _dpu_hw_sspp_setup_scaler3()

2023-03-09 Thread Dmitry Baryshkov
There is no need to pass full dpu_hw_sspp_cfg instance to _dpu_hw_sspp_setup_scaler3, pass just struct dpu_format pointer. Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c | 9 - drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h | 9 ++

[PATCH v5 14/32] drm/msm/dpu: drop src_split and multirect check from dpu_crtc_atomic_check

2023-03-09 Thread Dmitry Baryshkov
Neither source split nor multirect are properly supported at this moment. Both of these checks depend on normalized_zpos being equal for several planes (which is never the case for normalized zpos). Drop these checks to simplify dpu_crtc_atomic_check(). The actual support for either of these featur

[PATCH v5 07/32] drm/msm/dpu: introduce struct dpu_sw_pipe

2023-03-09 Thread Dmitry Baryshkov
Wrap SSPP and multirect index/mode into a single structure that represents software view on the pipe used. Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c| 9 +- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h | 16 ++- drivers/gpu/drm/

[PATCH v5 04/32] drm/msm/dpu: drop EAGAIN check from dpu_format_populate_layout

2023-03-09 Thread Dmitry Baryshkov
The pipe's layout is not cached, corresponding data structure is zeroed out each time in the dpu_plane_sspp_atomic_update(), right before the call to _dpu_plane_set_scanout() -> dpu_format_populate_layout(). Drop plane_addr comparison against previous layout and corresponding EAGAIN handling. Rev

[PATCH v5 13/32] drm/msm/dpu: rename dpu_hw_sspp_cfg to dpu_sw_pipe_cfg

2023-03-09 Thread Dmitry Baryshkov
As struct dpu_hw_sspp_cfg describes only the source and destination rectangles, it is a software pipe configuration now. Rename it accordingly. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c | 2 +- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h | 6 +++--- driver

[PATCH v5 08/32] drm/msm/dpu: use dpu_sw_pipe for dpu_hw_sspp callbacks

2023-03-09 Thread Dmitry Baryshkov
Where feasible, use dpu_sw_pipe rather than a combo of dpu_hw_sspp and multirect_index/_mode arguments. Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c | 59 + drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h | 46 +--

[PATCH v5 10/32] drm/msm/dpu: clean up SRC addresses when setting up SSPP for solid fill

2023-03-09 Thread Dmitry Baryshkov
Set SSPP_SRCn_ADDR registers to 0 while setting up solid fill, as we can not be sure that the previous address is still valid. Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c | 5 + 1 file changed, 5 insertions(+) diff --git a/driv

[PATCH v5 11/32] drm/msm/dpu: move stride programming to dpu_hw_sspp_setup_sourceaddress

2023-03-09 Thread Dmitry Baryshkov
Move stride programming to dpu_hw_sspp_setup_sourceaddress(), so that dpu_hw_sspp_setup_rects() programs only source and destination rectangles. Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c | 57 +++-- 1 file changed,

[PATCH v5 06/32] drm/msm/dpu: drop dpu_plane_pipe function

2023-03-09 Thread Dmitry Baryshkov
There no more need for the dpu_plane_pipe() function, crtc code can access pstate->pipe_hw.idx directly. Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 4 ++-- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 5 - drivers/gpu/drm/msm/di

[PATCH v5 05/32] drm/msm/dpu: move pipe_hw to dpu_plane_state

2023-03-09 Thread Dmitry Baryshkov
In preparation to adding fully virtualized planes, move struct dpu_hw_sspp instance from struct dpu_plane to struct dpu_plane_state, as it will become a part of state (variable, changes during runtime) rather than part of a plane (ideally should be statically allocated during boot). The sspp point

[PATCH v5 01/32] drm/msm/dpu: rename struct dpu_hw_pipe(_cfg) to dpu_hw_sspp(_cfg)

2023-03-09 Thread Dmitry Baryshkov
For all hardware blocks except SSPP the corresponding struct is named after the block. Rename dpu_hw_pipe (SSPP structure) to dpu_hw_sspp. Also rename struct dpu_hw_pipe_cfg to dpu_hw_sspp_cfg to follow this change. Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/

[PATCH v5 03/32] drm/msm/dpu: move SSPP debugfs creation to dpu_kms.c

2023-03-09 Thread Dmitry Baryshkov
As SSPP blocks are now visible through dpu_kms->rm.sspp_blocks, move SSPP debugfs creation from dpu_plane to dpu_kms. We are going to break the 1:1 correspondence between planes and SSPPs, so it makes no sense anymore to create SSPP debugfs entries in dpu_plane.c Reviewed-by: Abhinav Kumar Signed

[PATCH v5 02/32] drm/msm/dpu: move SSPP allocation to the RM

2023-03-09 Thread Dmitry Baryshkov
Follow the example of all other hw blocks and initialize SSPP blocks in Resource Manager. Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 17 - drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c| 22 ++ drive

[PATCH v5 00/32] drm/msm/dpu: wide planes support

2023-03-09 Thread Dmitry Baryshkov
This patchset brings in multirect usage to support using two SSPP rectangles for a single plane. Full virtual planes support is omitted from this pull request, it will come later. Changes since v4: - Incorporate two fixes and two cleanup patches from Abhinav Changes since v3: - moved if (!pipe->

[PATCH 2/4] drm/msm/dpu: remove unused dpu_plane_validate_multirect_v2 function

2023-03-09 Thread Abhinav Kumar
After cleaning up the older multirect support the function dpu_plane_validate_multirect_v2() is unused. Lets remove it. Signed-off-by: Abhinav Kumar --- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 111 -- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.h | 7 -- 2 files cha

[PATCH 3/4] drm/msm/dpu: call _dpu_crtc_blend_setup_pipe for r_pipe

2023-03-09 Thread Abhinav Kumar
_dpu_crtc_blend_setup_mixer() should call _dpu_crtc_blend_setup_pipe() to stage the rectangles of the sspp for both the left and right halves. However, it incorrectly invokes it only for the left half causing basic wide planes to not work and only half the screen is shown on the display. This was

[PATCH 4/4] drm/msm/dpu: log the multirect_index in _dpu_crtc_blend_setup_pipe

2023-03-09 Thread Abhinav Kumar
Lets print the multirect_index as well in _dpu_crtc_blend_setup_pipe() as it will give the complete information of the sw_pipe as well. Signed-off-by: Abhinav Kumar --- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/d

[PATCH 1/4] drm/msm/dpu: avoid checking uninitialized plane format

2023-03-09 Thread Abhinav Kumar
dpu_plane_atomic_check() checks for the format to make sure its not YUV before using multirect. However the format is not initialized before this. This causes a compilation issue and also would not work if YUV content is tried. Fix it by setting the format before the check. Signed-off-by: Abhina

[PATCH 0/4] drm/msm/dpu: wide planes fixes

2023-03-09 Thread Abhinav Kumar
While validating the DPU wide planes series [1], some issues were seen so decided to send this out in a separate series. Changes include compilation fixes, critical bug fixes and cleanups. These can easily be absorbed into that series as well but for the sake of having a clean series and also to

[PATCH RESEND] drm/armada: Fill in GEM object for each color plane

2023-03-09 Thread Doug Brown
This driver uses a single GEM object even when there are multiple planes. Starting with commit 746b9c62cc86 ("drm/gem: Ignore color planes that are unused by framebuffer format"), multiple plane support was broken on armada because the object pointers for the additional planes were empty and drm_ge

Re: [PATCH] drm/msm: Check for the GPU IOMMU during bind

2023-03-09 Thread Dmitry Baryshkov
On 10/03/2023 00:20, Jordan Crouse wrote: While booting with amd,imageon on a headless target the GPU probe was failing with -ENOSPC in get_pages() from msm_gem.c. Investigation showed that the driver was using the default 16MB VRAM carveout because msm_use_mmu() was returning false since headle

Re: [PATCH v3 2/2] drm/panel: Add driver for Novatek NT36523

2023-03-09 Thread Konrad Dybcio
[...] = of_graph_get_remote_node(dsi->dev.of_node, 1, -1); > + if (!dsi1) { > + dev_err(dev, "cannot get secondary DSI node.\n"); > + return -ENODEV; > + } > + > + dsi1_host = of_find_mipi_dsi_host_by_node(dsi1);

Re: [PATCH v2] drm/format-helper: Make conversion_buf_size() support sub-byte pixel fmts

2023-03-09 Thread Maíra Canal
On 3/7/23 18:50, Javier Martinez Canillas wrote: There are DRM fourcc formats that have pixels smaller than a byte, but the conversion_buf_size() function assumes that pixels are a multiple of bytes and use the struct drm_format_info .cpp field to calculate the dst_pitch. Instead, calculate it b

Re: [PATCH] drm/i915/mtl: Disable stolen memory backed FB for A0

2023-03-09 Thread Andi Shyti
Hi Nirmoy, On Thu, Mar 09, 2023 at 05:49:05PM +0100, Nirmoy Das wrote: > Stolen memory is not usable for MTL A0 stepping beyond > certain access size and we have no control over userspace > access size of /dev/fb which can be backed by stolen memory. > So disable stolen memory backed fb by setting

Re: [PATCH RFC 03/18] rust: drm: file: Add File abstraction

2023-03-09 Thread Asahi Lina
On 10/03/2023 06.16, Faith Ekstrand wrote: > On Tue, 2023-03-07 at 23:25 +0900, Asahi Lina wrote: >> A DRM File is the DRM counterpart to a kernel file structure, >> representing an open DRM file descriptor. Add a Rust abstraction to >> allow drivers to implement their own File types that implement

Re: [PATCH] drm/meson: fix missing component unbind on bind errors

2023-03-09 Thread Martin Blumenstingl
Hi Johan, thanks for your patch! On Mon, Mar 6, 2023 at 11:35 AM Johan Hovold wrote: [...] > @@ -325,23 +325,23 @@ static int meson_drv_bind_master(struct device *dev, > bool has_components) > > ret = meson_encoder_hdmi_init(priv); I'm wondering if component_bind_all() can be moved furt

Re: [PATCH] drm/meson: dw-hdmi: Fix devm_regulator_*get_enable*() conversion again

2023-03-09 Thread Martin Blumenstingl
On Thu, Mar 9, 2023 at 4:24 PM Marek Szyprowski wrote: > > devm_regulator_get_enable_optional() returns -ENODEV if requested > optional regulator is not present. Adjust code for that, because in the > 67d0a30128c9 I've incorrectly assumed that it also returns 0 when > regulator is not present. > >

[PATCH] drm/amd/display: use a more accurate check in dm_helpers_dp_read_dpcd()

2023-03-09 Thread Hamza Mahfooz
We should be checking if drm_dp_dpcd_read() returns the size that we are asking it to read instead of just checking if it is greater than zero. Also, we should WARN_ON() here since this condition is only ever met, if there is an issue worth investigating. So, compare the return value of drm_dp_dpcd

Re: [PATCH RFC 03/18] rust: drm: file: Add File abstraction

2023-03-09 Thread Faith Ekstrand
On Tue, 2023-03-07 at 23:25 +0900, Asahi Lina wrote: > A DRM File is the DRM counterpart to a kernel file structure, > representing an open DRM file descriptor. Add a Rust abstraction to > allow drivers to implement their own File types that implement the > DriverFile trait. > > Signed-off-by: Asa

[PATCH v8 2/3] drm/mediatek: Add support for AR30 and BA30 overlays

2023-03-09 Thread Justin Green
Add the ability for the Mediatek DRM driver to control the bit depth register. If the DTS indicates the device supports 10-bit overlays and the current format has a fourcc of AR30, BA30, or RA30, we set the bit depth register to 10 bit. The next patch in the series actually enables 10-bit overlays

[PATCH v8 1/3] drm/mediatek: Refactor pixel format logic

2023-03-09 Thread Justin Green
Add an DDP component interface for querying pixel format support and move list of supported pixel formats into DDP components instead of mtk_drm_plane.c Tested by running Chrome on an MT8195. Signed-off-by: Justin Green --- drivers/gpu/drm/mediatek/mtk_disp_drv.h | 4 ++ drivers/gpu/drm/me

[PATCH v7 RESEND 2/3] drm/mediatek: Add support for AR30 and BA30 overlays

2023-03-09 Thread Justin Green
Add the ability for the Mediatek DRM driver to control the bit depth register. If the DTS indicates the device supports 10-bit overlays and the current format has a fourcc of AR30, BA30, or RA30, we set the bit depth register to 10 bit. The next patch in the series actually enables 10-bit overlays

Re: [PATCH v7 RESEND 2/3] drm/mediatek: Add support for AR30 and BA30 overlays

2023-03-09 Thread Justin Green
Hi Chun-Kuang, Thanks for the review! This patch was tested like the previous one, by running Chrome on an MT8195 and looking for regressions. I'll post a new series with the updated patch descriptions. Regards, Justin On Wed, Mar 8, 2023 at 6:34 PM Chun-Kuang Hu wrote: > > Hi, Justin: > > Justi

[PATCH v8 3/3] drm/mediatek: Enable AR30 and BA30 overlays on MT8195

2023-03-09 Thread Justin Green
Modify the overlay driver data for MT8195 to enable bit depth control and enable support for AR30 and BA30 framebuffer formats. This patch in combination with the previous two patches in the series will allow MT8195 devices to scanout AR30 and BA30 framebuffers. Tested using "modetest -P" on an MT

[PATCH v8 0/3] drm/mediatek: Add support for 10-bit overlays

2023-03-09 Thread Justin Green
This patch series adds support for 10-bit overlays to the Mediatek DRM driver. Specifically, we add support for AR30 and BA30 overlays on MT8195 devices and lay the groundwork for supporting more 10-bit formats on more devices. 1. Refactor plane initialization logic to allow individual DDP compone

Re: [PATCH RFC 01/18] rust: drm: ioctl: Add DRM ioctl abstraction

2023-03-09 Thread Karol Herbst
On Thu, Mar 9, 2023 at 9:24 PM Faith Ekstrand wrote: > > On Thu, 2023-03-09 at 15:04 +0900, Asahi Lina wrote: > > On 08/03/2023 02.34, Björn Roy Baron wrote: > > > > +// SAFETY: This is just the ioctl > > > > argument, which hopefully has the right type > > > > +

Re: [PATCH RFC 01/18] rust: drm: ioctl: Add DRM ioctl abstraction

2023-03-09 Thread Faith Ekstrand
On Thu, 2023-03-09 at 15:04 +0900, Asahi Lina wrote: > On 08/03/2023 02.34, Björn Roy Baron wrote: > > > +    // SAFETY: This is just the ioctl > > > argument, which hopefully has the right type > > > +    // (we've done our best checking the > > > si

Re: [PATCH v3 02/17] drm/connector: Add enum documentation to drm_colorspace

2023-03-09 Thread Sebastian Wick
On Thu, Mar 9, 2023 at 11:03 AM Pekka Paalanen wrote: > > On Thu, 9 Mar 2023 01:56:11 +0100 > Sebastian Wick wrote: > > > On Wed, Mar 8, 2023 at 9:59 AM Pekka Paalanen wrote: > > > > > > On Tue, 7 Mar 2023 10:10:52 -0500 > > > Harry Wentland wrote: > > > > > > > From: Joshua Ashton > > > > > >

Re: [PATCH RFC 11/18] drm/scheduler: Clean up jobs when the scheduler is torn down

2023-03-09 Thread Faith Ekstrand
On Thu, 2023-03-09 at 18:43 +0900, Asahi Lina wrote: > On 09/03/2023 17.42, Christian König wrote: > > Am 08.03.23 um 20:37 schrieb Asahi Lina: > > > On 09/03/2023 03.12, Christian König wrote: > > > > Am 08.03.23 um 18:32 schrieb Asahi Lina: > > > > > [SNIP] > > > > > Yes but... none of this clean

[pull] drm/msm: drm-msm-fixes-2023-03-09 for v6.3-rc2

2023-03-09 Thread Rob Clark
Hi Dave, A few fixes for v6.3. Summary below. There is a back-merge of last-cycles -fixes to avoid a merge conflict in commit 6153c44392b0 ("drm/msm/adreno: fix runtime PM imbalance at unbind") The following changes since commit 92dd0575729a423aa5524d89055e34295152a2dd: Merge tag 'drm-msm-fi

Re: [PATCH] drm/tests: helpers: Drop empty platform remove function

2023-03-09 Thread Maíra Canal
On 2/24/23 19:14, Uwe Kleine-König wrote: A remove callback just returning 0 is equivalent to no remove callback at all. So drop the useless function. Signed-off-by: Uwe Kleine-König Applied to drm-misc-next. Best Regards, - Maíra Canal --- Hello, the remove function was introduced in com

Re: [PATCH RFC 10/18] drm/scheduler: Add can_run_job callback

2023-03-09 Thread Faith Ekstrand
Jumping in here quick... (Sorry, I was out yesterday and was ignoring my e-mail on Tuesday so I could finally type some compiler code.) On Thu, 2023-03-09 at 18:14 +0900, Asahi Lina wrote: > On 09/03/2023 17.05, Christian König wrote: > > Am 09.03.23 um 07:30 schrieb Asahi Lina: > > > On 09/03/202

Re: [pull] amdgpu, amdkfd drm-fixes-6.3

2023-03-09 Thread Chen, Xiaogang
On 3/9/2023 11:32 AM, Alex Deucher wrote: Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding. On Thu, Mar 9, 2023 at 12:16 PM Felix Kuehling wrote: Am 2023-03-08 um 23:38 schrieb Alex Deucher: Hi Dave, Dani

Re: [PATCH v2] drm/format-helper: Make conversion_buf_size() support sub-byte pixel fmts

2023-03-09 Thread Arthur Grillo Queiroz Cabral
Hi, On 07/03/23 18:50, Javier Martinez Canillas wrote: > There are DRM fourcc formats that have pixels smaller than a byte, but the > conversion_buf_size() function assumes that pixels are a multiple of bytes > and use the struct drm_format_info .cpp field to calculate the dst_pitch. > > Instea

Re: [PATCH] drm/amdkfd: fix potential kgd_mem UAFs

2023-03-09 Thread Felix Kuehling
Am 2023-03-08 um 16:37 schrieb Chia-I Wu: kgd_mem should be accessed with p->mutex locked, or it could have been freed by kfd_ioctl_free_memory_of_gpu. Thank you for the patch. It's not just about accessing kgd_mem with p->mutex held. It's also about holding the mutex continuously. I'd update

Re: [pull] amdgpu, amdkfd drm-fixes-6.3

2023-03-09 Thread Alex Deucher
On Thu, Mar 9, 2023 at 12:16 PM Felix Kuehling wrote: > > > Am 2023-03-08 um 23:38 schrieb Alex Deucher: > > Hi Dave, Daniel, > > > > Fixes for 6.3. > > > > The following changes since commit 66305069eb6d17d9190cbcd196f3f7487df47ae8: > > > >Merge tag 'drm-misc-fixes-2023-02-23' of > > git://a

Re: [pull] amdgpu, amdkfd drm-fixes-6.3

2023-03-09 Thread Felix Kuehling
Am 2023-03-08 um 23:38 schrieb Alex Deucher: Hi Dave, Daniel, Fixes for 6.3. The following changes since commit 66305069eb6d17d9190cbcd196f3f7487df47ae8: Merge tag 'drm-misc-fixes-2023-02-23' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes (2023-03-07 05:42:34 +1000) are a

Re: [PATCH] backlight: apple_bl: Use acpi_video_get_backlight_type()

2023-03-09 Thread Daniel Thompson
On Tue, Mar 07, 2023 at 01:05:40PM +0100, Hans de Goede wrote: > On some MacBooks both the apple_bl and the apple-gmux backlight drivers > may be able to export a /sys/class/backlight device. > > To avoid having 2 backlight devices for one LCD panel until now > the apple-gmux driver has been callin

[PATCH] drm/i915/mtl: Disable stolen memory backed FB for A0

2023-03-09 Thread Nirmoy Das
Stolen memory is not usable for MTL A0 stepping beyond certain access size and we have no control over userspace access size of /dev/fb which can be backed by stolen memory. So disable stolen memory backed fb by setting i915->dsm.usable_size to zero. Cc: Matthew Auld Cc: Andi Shyti Cc: Daniele C

Re: [PATCH 3/7] drm/i915/hwmon: Power PL1 limit and TDP setting

2023-03-09 Thread Guenter Roeck
On Tue, Feb 28, 2023 at 01:18:55PM -0800, Dixit, Ashutosh wrote: > On Fri, 12 Aug 2022 11:06:58 -0700, Guenter Roeck wrote: > > > > Hi Guenter/linux-hwmon, > > > > On 8/12/22 10:37, Badal Nilawar wrote: > > > From: Dale B Stimson > > > > > > Use i915 HWMON to display/modify dGfx power PL1 limit

Re: [PATCH] drm/meson: dw-hdmi: Fix devm_regulator_*get_enable*() conversion again

2023-03-09 Thread Neil Armstrong
On 09/03/2023 16:24, Marek Szyprowski wrote: devm_regulator_get_enable_optional() returns -ENODEV if requested optional regulator is not present. Adjust code for that, because in the 67d0a30128c9 I've incorrectly assumed that it also returns 0 when regulator is not present. Reported-by: Ricardo

[Bug 217168] New: mmap length not validated in drm_gem_dma_mmap()

2023-03-09 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=217168 Bug ID: 217168 Summary: mmap length not validated in drm_gem_dma_mmap() Product: Drivers Version: 2.5 Kernel Version: 6.2 Hardware: All OS: Linux Tree: Mainli

[PATCH v2 088/101] fbdev/uvesafb: Parse option string with struct option_iter

2023-03-09 Thread Thomas Zimmermann
Use struct option_iter to walk over the individual options in the driver's option string. Replaces the hand-written strsep() loop with a clean interface. The helpers for struct option_iter handle empty option strings and empty options transparently. The struct's _init and _release functions duplica

[PATCH v2 090/101] fbdev/valkyriefb: Parse option string with struct option_iter

2023-03-09 Thread Thomas Zimmermann
Use struct option_iter to walk over the individual options in the driver's option string. Replaces the hand-written strsep() loop with a clean interface. The helpers for struct option_iter handle empty option strings and empty options transparently. The struct's _init and _release functions duplica

[PATCH v2 070/101] fbdev/savagefb: Duplicate video-mode option string

2023-03-09 Thread Thomas Zimmermann
Assume that the driver does not own the option string or its substrings and hence duplicate the option string for the video mode. Allocate the copy's memory with kstrdup() and free it in the module's exit function. Done in preparation of switching the driver to struct option_iter and constifying t

[PATCH v2 003/101] fbdev/68328fb: Remove unused option string

2023-03-09 Thread Thomas Zimmermann
The option string is unused. Remove the variable and a related helper function. No functional change. Signed-off-by: Thomas Zimmermann --- drivers/video/fbdev/68328fb.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/video/fbdev/68328fb.c b/drivers/video/

[PATCH v2 082/101] fbdev/tgafb: Duplicate video-mode option string

2023-03-09 Thread Thomas Zimmermann
Assume that the driver does not own the option string or its substrings and hence duplicate the option string for the video mode. Allocate the copy's memory with kstrdup() and free it in the module's exit function. Done in preparation of switching the driver to struct option_iter and constifying t

[PATCH v2 086/101] fbdev/tridentfb: Parse option string with struct option_iter

2023-03-09 Thread Thomas Zimmermann
Use struct option_iter to walk over the individual options in the driver's option string. Replaces the hand-written strsep() loop with a clean interface. The helpers for struct option_iter handle empty option strings and empty options transparently. The struct's _init and _release functions duplica

[PATCH v2 077/101] fbdev/sstfb: Parse option string with struct option_iter

2023-03-09 Thread Thomas Zimmermann
Use struct option_iter to walk over the individual options in the driver's option string. Replaces the hand-written strsep() loop with a clean interface. The helpers for struct option_iter handle empty option strings and empty options transparently. The struct's _init and _release functions duplica

[PATCH v2 065/101] fbdev/pxafb: Parse option string with struct option_iter

2023-03-09 Thread Thomas Zimmermann
Use struct option_iter to walk over the individual options in the driver's option string. Replaces the hand-written strsep() loop with a clean interface. The helpers for struct option_iter handle empty option strings and empty options transparently. The struct's _init and _release functions duplica

[PATCH v2 089/101] fbdev/valkyriefb: Remove trailing whitespaces

2023-03-09 Thread Thomas Zimmermann
Fix coding style. No functional changes. Signed-off-by: Thomas Zimmermann --- drivers/video/fbdev/valkyriefb.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/video/fbdev/valkyriefb.c b/drivers/video/fbdev/valkyriefb.c index 1007023a5e88..b166b7cfe0e5 1

[PATCH v2 075/101] fbdev/sm712fb: Duplicate video-mode option string

2023-03-09 Thread Thomas Zimmermann
Assume that the driver does not own the option string or its substrings and hence duplicate the option string for the video mode. Allocate the copy's memory with kstrdup() and free it in the module's exit function. Done in preparation of switching the driver to struct option_iter and constifying t

[PATCH v2 011/101] fbdev/aty: Duplicate video-mode option string

2023-03-09 Thread Thomas Zimmermann
Assume that the drivers do not own the option string or its substrings and hence duplicate the option string for the video mode. Allocate the copy's memory with kstrdup() and free it in each module's exit function. Done in preparation of switching the driver to struct option_iter and constifying t

[PATCH v2 056/101] fbdev/platinumfb: Parse option string with struct option_iter

2023-03-09 Thread Thomas Zimmermann
Use struct option_iter to walk over the individual options in the driver's option string. Replaces the hand-written strsep() loop with a clean interface. The helpers for struct option_iter handle empty option strings and empty options transparently. The struct's _init and _release functions duplica

[PATCH v2 083/101] fbdev/tgafb: Parse option string with struct option_iter

2023-03-09 Thread Thomas Zimmermann
Use struct option_iter to walk over the individual options in the driver's option string. Replaces the hand-written strsep() loop with a clean interface. The helpers for struct option_iter handle empty option strings and empty options transparently. The struct's _init and _release functions duplica

  1   2   3   4   >