Re: [PATCH 01/19] dma-buf-map: Add read/write helpers

2022-01-26 Thread Christian König
Am 27.01.22 um 08:36 schrieb Matthew Brost: [SNIP] /** * dma_buf_map_memcpy_to - Memcpy into dma-buf mapping * @dst: The dma-buf mapping structure @@ -263,4 +304,44 @@ static inline void dma_buf_map_incr(struct dma_buf_map *map, size_t incr) map->vaddr += incr;

Re: [PATCH 02/19] dma-buf-map: Add helper to initialize second map

2022-01-26 Thread Lucas De Marchi
On Thu, Jan 27, 2022 at 08:27:11AM +0100, Christian König wrote: Am 26.01.22 um 21:36 schrieb Lucas De Marchi: When dma_buf_map struct is passed around, it's useful to be able to initialize a second map that takes care of reading/writing to an offset of the original map. Add a helper that

Re: [PATCH 6/8] drm/i915/dp: add 128b/132b support to link status checks

2022-01-26 Thread Ville Syrjälä
On Tue, Jan 25, 2022 at 07:03:44PM +0200, Jani Nikula wrote: > Abstract link status check to a function that takes 128b/132b and 8b/10b > into account, and use it. Also dump link status on failures. > > Cc: Uma Shankar > Cc: Ville Syrjälä > Signed-off-by: Jani Nikula > --- >

Re: [PATCH 5/8] drm/i915/dp: rewrite DP 2.0 128b/132b link training based on errata

2022-01-26 Thread Ville Syrjälä
On Tue, Jan 25, 2022 at 07:03:43PM +0200, Jani Nikula wrote: > +static bool > +intel_dp_128b132b_lane_cds(struct intel_dp *intel_dp, > +const struct intel_crtc_state *crtc_state, > +int lttpr_count) > +{ > + struct intel_encoder *encoder =

Re: [PATCH 01/19] dma-buf-map: Add read/write helpers

2022-01-26 Thread Matthew Brost
On Thu, Jan 27, 2022 at 08:24:04AM +0100, Christian König wrote: > Am 26.01.22 um 21:36 schrieb Lucas De Marchi: > > In certain situations it's useful to be able to read or write to an > > offset that is calculated by having the memory layout given by a struct > > declaration. Usually we are going

Re: [PATCH 3/8] drm/dp: add some new DPCD macros from DP 2.0 E11

2022-01-26 Thread Ville Syrjälä
On Tue, Jan 25, 2022 at 07:03:41PM +0200, Jani Nikula wrote: > Add some of the new additions from DP 2.0 E11. > > Cc: Uma Shankar > Cc: Ville Syrjälä > Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä > --- > include/drm/dp/drm_dp_helper.h | 2 ++ > 1 file changed, 2 insertions(+) >

[PATCH v1] drm/panel: simple: Tune timing for ET057090DHU

2022-01-26 Thread Francesco Dolcini
From: Oleksandr Suvorov VESA Display Monitor Timing v1.13 has recommendations for the historical VGA mode 640x480 60Hz. These parameters are compatible with EDT ET057090DHU recommended timings. Use VESA DMT timing parameters for EDT ET057090DHU panel. Signed-off-by: Oleksandr Suvorov Cc:

Re: [PATCH 09/19] dma-buf-map: Add wrapper over memset

2022-01-26 Thread Christian König
Am 26.01.22 um 21:36 schrieb Lucas De Marchi: Just like memcpy_toio(), there is also need to write a direct value to a memory block. Add dma_buf_map_memset() to abstract memset() vs memset_io() Cc: Matt Roper Cc: Sumit Semwal Cc: Christian König Cc: linux-me...@vger.kernel.org Cc:

Re: [PATCH 1/8] drm/dp: add drm_dp_128b132b_read_aux_rd_interval()

2022-01-26 Thread Ville Syrjälä
On Tue, Jan 25, 2022 at 07:03:39PM +0200, Jani Nikula wrote: > The DP 2.0 errata changes DP_128B132B_TRAINING_AUX_RD_INTERVAL (DPCD > 0x2216) completely. Add a new function to read that. Follow-up will need > to clean up existing functions. > > v2: fix reversed interpretation of bit 7 meaning

Re: [PATCH 02/19] dma-buf-map: Add helper to initialize second map

2022-01-26 Thread Christian König
Am 26.01.22 um 21:36 schrieb Lucas De Marchi: When dma_buf_map struct is passed around, it's useful to be able to initialize a second map that takes care of reading/writing to an offset of the original map. Add a helper that copies the struct and add the offset to the proper address. Well

Re: [PATCH 01/19] dma-buf-map: Add read/write helpers

2022-01-26 Thread Christian König
Am 26.01.22 um 21:36 schrieb Lucas De Marchi: In certain situations it's useful to be able to read or write to an offset that is calculated by having the memory layout given by a struct declaration. Usually we are going to read/write a u8, u16, u32 or u64. Add a pair of macros

Re: [PATCH] drivers: Fix typo in comment

2022-01-26 Thread Greg KH
On Thu, Jan 27, 2022 at 02:51:56PM +0800, tangmeng wrote: > Replace disbale with disable and replace unavaibale with unavailable. > > Signed-off-by: tangmeng > --- > drivers/gpu/drm/amd/amdgpu/mxgpu_vi.c | 2 +- > drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 2 +- > drivers/pcmcia/rsrc_nonstatic.c

Re: mmotm 2022-01-26-21-04 uploaded (gpu/drm/i915/i915_gem_evict.h)

2022-01-26 Thread Randy Dunlap
On 1/26/22 21:04, a...@linux-foundation.org wrote: > The mm-of-the-moment snapshot 2022-01-26-21-04 has been uploaded to > >https://www.ozlabs.org/~akpm/mmotm/ > > mmotm-readme.txt says > > README for mm-of-the-moment: > > https://www.ozlabs.org/~akpm/mmotm/ > > This is a snapshot of

Re: [PATCH v1 0/4] fbtft: Unorphan the driver for maintenance

2022-01-26 Thread Dan Carpenter
On Wed, Jan 26, 2022 at 11:31:02PM +0100, Daniel Vetter wrote: > dOn Wed, Jan 26, 2022 at 3:46 PM Dan Carpenter > wrote: > > > > The other advantage of staging is the I don't think syzbot enables it. > > I guess it's easier to persuade Dmitry to ignore STAGING than it was to > > get him to

Re: [PATCH 16/19] drm/i915/guc: Use a single pass to calculate regset

2022-01-26 Thread kernel test robot
Hi Lucas, Thank you for the patch! Yet something to improve: [auto build test ERROR on drm-tip/drm-tip] [also build test ERROR on next-20220125] [cannot apply to drm-intel/for-linux-next drm-exynos/exynos-drm-next drm/drm-next tegra-drm/drm/tegra/for-next linus/master airlied/drm-next

[pull] amdgpu drm-fixes-5.17

2022-01-26 Thread Alex Deucher
Hi Dave, Daniel, Fixes for 5.17. The following changes since commit e783362eb54cd99b2cac8b3a9aeac942e6f6ac07: Linux 5.17-rc1 (2022-01-23 10:12:53 +0200) are available in the Git repository at: https://gitlab.freedesktop.org/agd5f/linux.git tags/amd-drm-fixes-5.17-2022-01-26 for you to

Re: [PATCH v5 4/4] dt-bindings: drm/bridge: anx7625: Add aux-bus node

2022-01-26 Thread Hsin-Yi Wang
On Tue, Jan 25, 2022 at 2:25 PM Hsin-Yi Wang wrote: > > On Wed, Jan 19, 2022 at 11:36 PM Robert Foss wrote: > > > > Hey Hsin-Yi, > > > > While I can review this patch, I don't have the authority to merge it > > since it is outside the scope of my maintainership. Rob Herring, > > Daniel Vetter or

[RFC PATCH v5 3/3] drm: remove allow_fb_modifiers

2022-01-26 Thread Tomohito Esaki
The allow_fb_modifiers flag is unnecessary since it has been replaced with fb_modifiers_not_supported flag. Signed-off-by: Tomohito Esaki --- drivers/gpu/drm/selftests/test-drm_framebuffer.c | 1 - include/drm/drm_mode_config.h| 16 2 files changed, 17

[RFC PATCH v5 2/3] drm: add support modifiers for drivers whose planes only support linear layout

2022-01-26 Thread Tomohito Esaki
The LINEAR modifier is advertised as default if a driver doesn't specify modifiers. Signed-off-by: Tomohito Esaki --- drivers/gpu/drm/drm_plane.c | 23 +-- include/drm/drm_plane.h | 3 +++ 2 files changed, 16 insertions(+), 10 deletions(-) diff --git

[RFC PATCH v5 1/3] drm: introduce fb_modifiers_not_supported flag in mode_config

2022-01-26 Thread Tomohito Esaki
If only linear modifier is advertised, since there are many drivers that only linear supported, the DRM core should handle this rather than open-coding in every driver. However, there are legacy drivers such as radeon that do not support modifiers but infer the actual layout of the underlying

[RFC PATCH v5 0/3] Add support modifiers for drivers whose planes only support linear layout

2022-01-26 Thread Tomohito Esaki
Some drivers whose planes only support linear layout fb do not support format modifiers. These drivers should support modifiers, however the DRM core should handle this rather than open-coding in every driver. In this patch series, these drivers expose format modifiers based on the following

Re: [PATCH v3 09/10] tools: update hmm-test to support device coherent type

2022-01-26 Thread Sierra Guiza, Alejandro (Alex)
On 1/20/2022 12:14 AM, Alistair Popple wrote: On Tuesday, 11 January 2022 9:32:00 AM AEDT Alex Sierra wrote: Test cases such as migrate_fault and migrate_multiple, were modified to explicit migrate from device to sys memory without the need of page faults, when using device coherent type.

[PATCH v4 10/10] tools: update test_hmm script to support SP config

2022-01-26 Thread Alex Sierra
Add two more parameters to set spm_addr_dev0 & spm_addr_dev1 addresses. These two parameters configure the start SP addresses for each device in test_hmm driver. Consequently, this configures zone device type as coherent. Signed-off-by: Alex Sierra Reviewed-by: Alistair Popple --- v2: Add more

[PATCH v4 03/10] mm/gup: fail get_user_pages for LONGTERM dev coherent type

2022-01-26 Thread Alex Sierra
Avoid long term pinning for Coherent device type pages. This could interfere with their own device memory manager. For now, we are just returning error for PIN_LONGTERM Coherent device type pages. Eventually, these type of pages will get migrated to system memory, once the device migration pages

[PATCH v4 05/10] drm/amdkfd: coherent type as sys mem on migration to ram

2022-01-26 Thread Alex Sierra
Coherent device type memory on VRAM to RAM migration, has similar access as System RAM from the CPU. This flag sets the source from the sender. Which in Coherent type case, should be set as MIGRATE_VMA_SELECT_DEVICE_COHERENT. Signed-off-by: Alex Sierra Reviewed-by: Felix Kuehling ---

[PATCH v4 07/10] lib: test_hmm add module param for zone device type

2022-01-26 Thread Alex Sierra
In order to configure device coherent in test_hmm, two module parameters should be passed, which correspond to the SP start address of each device (2) spm_addr_dev0 & spm_addr_dev1. If no parameters are passed, private device type is configured. Signed-off-by: Alex Sierra --- lib/test_hmm.c

[PATCH v4 09/10] tools: update hmm-test to support device coherent type

2022-01-26 Thread Alex Sierra
Test cases such as migrate_fault and migrate_multiple, were modified to explicit migrate from device to sys memory without the need of page faults, when using device coherent type. Snapshot test case updated to read memory device type first and based on that, get the proper returned results

[PATCH v4 04/10] drm/amdkfd: add SPM support for SVM

2022-01-26 Thread Alex Sierra
When CPU is connected throug XGMI, it has coherent access to VRAM resource. In this case that resource is taken from a table in the device gmc aperture base. This resource is used along with the device type, which could be DEVICE_PRIVATE or DEVICE_COHERENT to create the device page map region.

[PATCH v4 08/10] lib: add support for device coherent type in test_hmm

2022-01-26 Thread Alex Sierra
Device Coherent type uses device memory that is coherently accesible by the CPU. This could be shown as SP (special purpose) memory range at the BIOS-e820 memory enumeration. If no SP memory is supported in system, this could be faked by setting CONFIG_EFI_FAKE_MEMMAP. Currently, test_hmm only

[PATCH v4 06/10] lib: test_hmm add ioctl to get zone device type

2022-01-26 Thread Alex Sierra
new ioctl cmd added to query zone device type. This will be used once the test_hmm adds zone device coherent type. Signed-off-by: Alex Sierra --- lib/test_hmm.c | 23 +-- lib/test_hmm_uapi.h | 8 2 files changed, 29 insertions(+), 2 deletions(-) diff --git

[PATCH v4 02/10] mm: add device coherent vma selection for memory migration

2022-01-26 Thread Alex Sierra
This case is used to migrate pages from device memory, back to system memory. Device coherent type memory is cache coherent from device and CPU point of view. Signed-off-by: Alex Sierra --- v2: condition added when migrations from device coherent pages. --- include/linux/migrate.h | 1 +

[PATCH v4 00/10] Add MEMORY_DEVICE_COHERENT for coherent device memory mapping

2022-01-26 Thread Alex Sierra
This patch series introduces MEMORY_DEVICE_COHERENT, a type of memory owned by a device that can be mapped into CPU page tables like MEMORY_DEVICE_GENERIC and can also be migrated like MEMORY_DEVICE_PRIVATE. Christoph, the suggestion to incorporate Ralph Campbell’s refcount cleanup patch into our

[PATCH v4 01/10] mm: add zone device coherent type memory support

2022-01-26 Thread Alex Sierra
Device memory that is cache coherent from device and CPU point of view. This is used on platforms that have an advanced system bus (like CAPI or CXL). Any page of a process can be migrated to such memory. However, no one should be allowed to pin such memory so that it can always be evicted.

[PATCH v1, 8/8] media: mtk-vcodec: Add to support H264 inner racing mode

2022-01-26 Thread Yunfei Dong
In order to reduce decoder latency, enable H264 inner racing mode. Send lat trans buffer information to core when trigger lat to work, need not to wait until lat decode done. Signed-off-by: Yunfei Dong --- .../platform/mtk-vcodec/mtk_vcodec_dec_drv.c | 4 +++

[PATCH v1, 7/8] media: uapi: Init VP9 stateless decode params

2022-01-26 Thread Yunfei Dong
Init some of VP9 frame decode params to default value. Signed-off-by: Yunfei Dong --- drivers/media/v4l2-core/v4l2-ctrls-core.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/media/v4l2-core/v4l2-ctrls-core.c b/drivers/media/v4l2-core/v4l2-ctrls-core.c index

[PATCH v1, 6/8] media: mtk-vcodec: prevent kernel crash when scp ipi timeout

2022-01-26 Thread Yunfei Dong
From: Tinghan Shen When SCP timeout during playing video, kernel crashes with following message. It's caused by accessing NULL pointer in vpu_dec_ipi_handler. This patch doesn't solve the root cause of NULL pointer, but merely prevent kernel crashed when encounter the NULL pointer. After

[PATCH v1, 5/8] media: mtk-vcodec: Different codec using different capture format

2022-01-26 Thread Yunfei Dong
Vp8 need to use MM21, but vp9 and h264 need to use HyFbc mode for mt8195. Vp8/vp9/h264 use the same MM21 format for mt8192. Signed-off-by: Yunfei Dong --- .../platform/mtk-vcodec/mtk_vcodec_dec.c | 41 +++ 1 file changed, 41 insertions(+) diff --git

[PATCH v1, 4/8] media: mtk-vcodec: Adds compatible for mt8195

2022-01-26 Thread Yunfei Dong
Adds compatible for mt8195 platform. Signed-off-by: Yunfei Dong --- drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c

[PATCH v1, 3/8] dt-bindings: media: mtk-vcodec: Adds decoder dt-bindings for mt8195

2022-01-26 Thread Yunfei Dong
Adds decoder dt-bindings for mt8195. Signed-off-by: Yunfei Dong --- .../bindings/media/mediatek,vcodec-subdev-decoder.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/media/mediatek,vcodec-subdev-decoder.yaml

[PATCH v1, 2/8] media: mtk-vcodec: Add to support lat soc hardware

2022-01-26 Thread Yunfei Dong
Add lat soc compatible and to support lat soc power/clk helper. Signed-off-by: Yunfei Dong --- .../platform/mtk-vcodec/mtk_vcodec_dec_hw.c | 12 +--- .../platform/mtk-vcodec/mtk_vcodec_dec_hw.h | 2 ++ .../platform/mtk-vcodec/mtk_vcodec_dec_pm.c | 16

[PATCH v1, 1/8] dt-bindings: media: mtk-vcodec: Adds decoder dt-bindings for lat soc

2022-01-26 Thread Yunfei Dong
Adds decoder dt-bindings for compatible "mediatek,mtk-vcodec-lat-soc". Signed-off-by: Yunfei Dong --- .../media/mediatek,vcodec-subdev-decoder.yaml | 49 +++ 1 file changed, 49 insertions(+) diff --git

[PATCH v1, 0/8] support mt8195 decoder

2022-01-26 Thread Yunfei Dong
Firstly, add mt8195 soc lat hardware and compatible, then add documents. For vp8 only support MM21 mode, H264/vp9 support MT21C, need to separate them. Next, initialize vp9 stateless decoder parameters. Lastly, enable H264 inner racing mode to reduce hardware latency. Patch 1~4 add mt8195 soc lat

Re: [PATCH 16/19] drm/i915/guc: Use a single pass to calculate regset

2022-01-26 Thread kernel test robot
Hi Lucas, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on drm-tip/drm-tip] [also build test WARNING on next-20220125] [cannot apply to drm-intel/for-linux-next drm-exynos/exynos-drm-next drm/drm-next tegra-drm/drm/tegra/for-next linus/master airlied/drm-next

Re: [PATCH v2] drm/bridge: Add missing pm_runtime_put_sync

2022-01-26 Thread Laurent Pinchart
Hi Yongzhi, Thank you for the patch. On Sun, Jan 23, 2022 at 11:20:35PM -0800, Yongzhi Liu wrote: > pm_runtime_get_sync() will increase the rumtime PM counter > even when it returns an error. Thus a pairing decrement is needed > to prevent refcount leak. Fix this by replacing this API with >

Re: [PATCH 16/19] drm/i915/guc: Use a single pass to calculate regset

2022-01-26 Thread kernel test robot
Hi Lucas, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on drm-tip/drm-tip] [also build test WARNING on next-20220125] [cannot apply to drm-intel/for-linux-next drm-exynos/exynos-drm-next drm/drm-next tegra-drm/drm/tegra/for-next linus/master airlied/drm-next

[PATCH v2] drm/msm/dp: add connector type to enhance debug messages

2022-01-26 Thread Kuogee Hsieh
DP driver is a generic driver which supports both eDP and DP. For debugging purpose it is required to have capabilities to differentiate message are generated from eDP or DP. This patch do: 1) add connector type into debug messages within dp_display.c 2) revise debug messages related to DP phy

Re: [PATCH 4/8] drm/i915: Use preempt_disable/enable_rt() where recommended

2022-01-26 Thread Mario Kleiner
On Tue, Dec 14, 2021 at 3:03 PM Sebastian Andrzej Siewior < bige...@linutronix.de> wrote: > From: Mike Galbraith > > Mario Kleiner suggest in commit > ad3543ede630f ("drm/intel: Push get_scanout_position() timestamping into > kms driver.") > > a spots where preemption should be disabled on

Re: [PATCH v1 0/4] fbtft: Unorphan the driver for maintenance

2022-01-26 Thread Daniel Vetter
On Wed, Jan 26, 2022 at 3:24 PM Greg Kroah-Hartman wrote: > On Wed, Jan 26, 2022 at 03:18:14PM +0100, Javier Martinez Canillas wrote: > > On 1/26/22 15:11, Andy Shevchenko wrote: > > > On Wed, Jan 26, 2022 at 02:47:33PM +0100, Javier Martinez Canillas wrote: > > >> On 1/26/22 14:27, Andy

Re: [PATCH v1 0/4] fbtft: Unorphan the driver for maintenance

2022-01-26 Thread Daniel Vetter
dOn Wed, Jan 26, 2022 at 3:46 PM Dan Carpenter wrote: > > The other advantage of staging is the I don't think syzbot enables it. > I guess it's easier to persuade Dmitry to ignore STAGING than it was to > get him to disable FBDEV. :P > > The memory corruption in fbdev was a real headache for

Re: [PATCH 17/27] dt-bindings: display: rockchip: Add binding for VOP2

2022-01-26 Thread Rob Herring
On Wed, 26 Jan 2022 15:55:39 +0100, Sascha Hauer wrote: > The VOP2 is found on newer Rockchip SoCs like the rk3568 or the rk3566. > The binding differs slightly from the existing VOP binding, so add a new > binding file for it. > > Changes since v3: > - drop redundant _vop suffix from clock names

[PATCH v10 4/5] drm/amdgpu: move vram inline functions into a header

2022-01-26 Thread Arunpravin
Move shared vram inline functions and structs into a header file Signed-off-by: Arunpravin --- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.h | 51 1 file changed, 51 insertions(+) create mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.h diff --git

[PATCH v10 5/5] drm/amdgpu: add drm buddy support to amdgpu

2022-01-26 Thread Arunpravin
- Remove drm_mm references and replace with drm buddy functionalities - Add res cursor support for drm buddy v2(Matthew Auld): - replace spinlock with mutex as we call kmem_cache_zalloc (..., GFP_KERNEL) in drm_buddy_alloc() function - lock drm_buddy_block_trim() function as it calls

[PATCH v10 2/5] drm: implement top-down allocation method

2022-01-26 Thread Arunpravin
Implemented a function which walk through the order list, compares the offset and returns the maximum offset block, this method is unpredictable in obtaining the high range address blocks which depends on allocation and deallocation. for instance, if driver requests address at a low specific

[PATCH v10 3/5] drm: implement a method to free unused pages

2022-01-26 Thread Arunpravin
On contiguous allocation, we round up the size to the *next* power of 2, implement a function to free the unused pages after the newly allocate block. v2(Matthew Auld): - replace function name 'drm_buddy_free_unused_pages' with drm_buddy_block_trim - replace input argument name

[PATCH v10 1/5] drm: improve drm_buddy_alloc function

2022-01-26 Thread Arunpravin
- Make drm_buddy_alloc a single function to handle range allocation and non-range allocation demands - Implemented a new function alloc_range() which allocates the requested power-of-two block comply with range limitations - Moved order computation and memory alignment logic from i915

Re: [PATCH v9 4/6] drm: implement a method to free unused pages

2022-01-26 Thread Arunpravin
> -Original Message- > From: amd-gfx On Behalf Of Matthew > Auld > Sent: Thursday, January 20, 2022 11:05 PM > To: Paneer Selvam, Arunpravin ; > dri-devel@lists.freedesktop.org; intel-...@lists.freedesktop.org; > amd-...@lists.freedesktop.org > Cc: Deucher, Alexander ;

Re: [PATCH v2] drm/bridge/tc358775: Fix for dual-link LVDS

2022-01-26 Thread Jiří Vaněk
AUO P215HVN01.0 / AUO G215HVN01.0 čt 6. 1. 2022 v 20:22 odesílatel Vinay Simha B N napsal: > Reviewed-by: Vinay Simha BN > > Jiri Vanek, > Could you please share the part number or datasheet of the dual-link LVDS > display/panel used. > > > On Fri, Jan 7, 2022 at 12:30 AM Jiri Vanek wrote:

Re: [PATCH v9 2/6] drm: improve drm_buddy_alloc function

2022-01-26 Thread Arunpravin
On 21/01/22 5:30 pm, Matthew Auld wrote: > On 19/01/2022 11:37, Arunpravin wrote: >> - Make drm_buddy_alloc a single function to handle >>range allocation and non-range allocation demands >> >> - Implemented a new function alloc_range() which allocates >>the requested power-of-two block

[PATCH v2] drm/bridge: synopsys/dw-hdmi: set cec clock rate

2022-01-26 Thread Peter Geis
The hdmi-cec clock must be 32khz in order for cec to work correctly. Ensure before enabling the clock we set it in order for the hardware to work as expected. Fixes hdmi-cec support on Rockchip devices. Fixes: ebe32c3e282a ("drm/bridge: synopsys/dw-hdmi: Enable cec clock") Signed-off-by: Peter

Re: [PATCH] drm/v3d: Add missing unlock

2022-01-26 Thread Melissa Wen
On 01/22, Yongzhi Liu wrote: > [why] > Unlock is needed on the error handling path to prevent dead lock. > > [how] > Fix this by adding drm_gem_unlock_reservations on the error handling path. > > Signed-off-by: Yongzhi Liu > --- > drivers/gpu/drm/v3d/v3d_gem.c | 4 > 1 file changed, 4

Re: [PATCH] drm: rcar-du: Drop LVDS device tree backward compatibility

2022-01-26 Thread Kieran Bingham
Quoting Laurent Pinchart (2022-01-26 20:29:56) > The rcar-du driver goes to great lengths to preserve device tree > backward compatibility for the LVDS encoders by patching old device > trees at runtime. > > The last R-Car Gen2 platform was converted to the new bindings commit > edb0c3affe5214a2

[PATCH 09/19] dma-buf-map: Add wrapper over memset

2022-01-26 Thread Lucas De Marchi
Just like memcpy_toio(), there is also need to write a direct value to a memory block. Add dma_buf_map_memset() to abstract memset() vs memset_io() Cc: Matt Roper Cc: Sumit Semwal Cc: Christian König Cc: linux-me...@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc:

[PATCH 17/19] drm/i915/guc: Convert guc_mmio_reg_state_init to dma_buf_map

2022-01-26 Thread Lucas De Marchi
Now that the regset list is prepared, convert guc_mmio_reg_state_init() to use dma_buf_map to copy the array to the final location and initialize additional fields in ads.reg_state_list. Cc: Matt Roper Cc: Thomas Hellström Cc: Daniel Vetter Cc: John Harrison Cc: Matthew Brost Cc: Daniele

[PATCH 19/19] drm/i915/guc: Remove plain ads_blob pointer

2022-01-26 Thread Lucas De Marchi
Now we have the access to content of GuC ADS either using dma_buf_map API or using a temporary buffer. Remove guc->ads_blob as there shouldn't be updates using the bare pointer anymore. Cc: Matt Roper Cc: Thomas Hellström Cc: Daniel Vetter Cc: John Harrison Cc: Matthew Brost Cc: Daniele

[PATCH 18/19] drm/i915/guc: Convert __guc_ads_init to dma_buf_map

2022-01-26 Thread Lucas De Marchi
Now that all the called functions from __guc_ads_init() are converted to use ads_map, stop using ads_blob in __guc_ads_init(). Cc: Matt Roper Cc: Thomas Hellström Cc: Daniel Vetter Cc: John Harrison Cc: Matthew Brost Cc: Daniele Ceraolo Spurio Signed-off-by: Lucas De Marchi ---

[PATCH 16/19] drm/i915/guc: Use a single pass to calculate regset

2022-01-26 Thread Lucas De Marchi
The ADS initialitazion was using 2 passes to calculate the regset sent to GuC to initialize each engine: the first pass to just have the final object size and the second to set each register in place in the final gem object. However in order to maintain an ordered set of registers to pass to guc,

[PATCH 08/19] drm/i915/guc: Convert engine record to dma_buf_map

2022-01-26 Thread Lucas De Marchi
Use dma_buf_map to read fields from the dma_blob so access to IO and system memory is abstracted away. Cc: Matt Roper Cc: Thomas Hellström Cc: Daniel Vetter Cc: John Harrison Cc: Matthew Brost Cc: Daniele Ceraolo Spurio Signed-off-by: Lucas De Marchi ---

[PATCH 15/19] drm/i915/guc: Prepare for error propagation

2022-01-26 Thread Lucas De Marchi
Currently guc_mmio_reg_add() relies on having enough memory available in the array to add a new slot. It uses `GEM_BUG_ON(count >= regset->size);` to protect going above the threshold. In order to allow guc_mmio_reg_add() to handle the memory allocation by itself, it must return an error in case

[PATCH 12/19] drm/i915/guc: Replace check for golden context size

2022-01-26 Thread Lucas De Marchi
In the other places in this function, guc->ads_map is being protected from access when it's not yet set. However the last check is actually about guc->ads_golden_ctxt_size been set before. These checks should always match as the size is initialized on the first call to guc_prep_golden_context(),

[PATCH 02/19] dma-buf-map: Add helper to initialize second map

2022-01-26 Thread Lucas De Marchi
When dma_buf_map struct is passed around, it's useful to be able to initialize a second map that takes care of reading/writing to an offset of the original map. Add a helper that copies the struct and add the offset to the proper address. Cc: Sumit Semwal Cc: Christian König Cc:

[PATCH 11/19] drm/i915/guc: Convert golden context prep to dma_buf_map

2022-01-26 Thread Lucas De Marchi
Use the saved ads_map to prepare the golden context. One difference from the init context is that this function can be called before there is a gem object (and thus the guc->ads_map) to calculare the size of the golden context that should be allocated for that object. So in this case the function

[PATCH 04/19] drm/i915/guc: Keep dma_buf_map of ads_blob around

2022-01-26 Thread Lucas De Marchi
Convert intel_guc_ads_create() and initialization to use dma_buf_map rather than plain pointer and save it in the guc struct. This will help with additional updates to the ads_blob after the creation/initialization by abstracting the IO vs system memory. Cc: Matt Roper Cc: Thomas Hellström Cc:

[PATCH 07/19] drm/i915/guc: Convert policies update to dma_buf_map

2022-01-26 Thread Lucas De Marchi
Use dma_buf_map to write the policies update so access to IO and system memory is abstracted away. Cc: Matt Roper Cc: Thomas Hellström Cc: Daniel Vetter Cc: John Harrison Cc: Matthew Brost Cc: Daniele Ceraolo Spurio Signed-off-by: Lucas De Marchi ---

[PATCH 13/19] drm/i915/guc: Convert mapping table to dma_buf_map

2022-01-26 Thread Lucas De Marchi
Use dma_buf_map to write the fields system_info.mapping_table[][]. Since we already have the info_map around where needed, just use it instead of going through guc->ads_map. Cc: Matt Roper Cc: Thomas Hellström Cc: Daniel Vetter Cc: John Harrison Cc: Matthew Brost Cc: Daniele Ceraolo Spurio

[PATCH 06/19] drm/i915/guc: Convert golden context init to dma_buf_map

2022-01-26 Thread Lucas De Marchi
Now the map is saved during creation, so use it to initialize the golden context, reading from shmem and writing to either system or IO memory. Cc: Matt Roper Cc: Thomas Hellström Cc: Daniel Vetter Cc: John Harrison Cc: Matthew Brost Cc: Daniele Ceraolo Spurio Signed-off-by: Lucas De Marchi

[PATCH 14/19] drm/i915/guc: Convert capture list to dma_buf_map

2022-01-26 Thread Lucas De Marchi
Use dma_buf_map to write the fields ads.capture_*. Cc: Matt Roper Cc: Thomas Hellström Cc: Daniel Vetter Cc: John Harrison Cc: Matthew Brost Cc: Daniele Ceraolo Spurio Signed-off-by: Lucas De Marchi --- drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c | 10 +- 1 file changed, 5

[PATCH 10/19] drm/i915/guc: Convert guc_ads_private_data_reset to dma_buf_map

2022-01-26 Thread Lucas De Marchi
Use dma_buf_map_memset() to zero the private data as ADS may be either on system or IO memory. Cc: Matt Roper Cc: Thomas Hellström Cc: Daniel Vetter Cc: John Harrison Cc: Matthew Brost Cc: Daniele Ceraolo Spurio Signed-off-by: Lucas De Marchi --- drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c

[PATCH 05/19] drm/i915/guc: Add read/write helpers for ADS blob

2022-01-26 Thread Lucas De Marchi
Add helpers on top of dma_buf_map_read_field() / dma_buf_map_write_field() functions so they always use the right arguments and make code easier to read. Cc: Matt Roper Cc: Thomas Hellström Cc: Daniel Vetter Cc: John Harrison Cc: Matthew Brost Cc: Daniele Ceraolo Spurio Signed-off-by: Lucas

[PATCH 01/19] dma-buf-map: Add read/write helpers

2022-01-26 Thread Lucas De Marchi
In certain situations it's useful to be able to read or write to an offset that is calculated by having the memory layout given by a struct declaration. Usually we are going to read/write a u8, u16, u32 or u64. Add a pair of macros dma_buf_map_read_field()/dma_buf_map_write_field() to calculate

[PATCH 03/19] drm/i915/gt: Add helper for shmem copy to dma_buf_map

2022-01-26 Thread Lucas De Marchi
Add a variant of shmem_read() that takes a dma_buf_map pointer rather than a plain pointer as argument. It's mostly a copy __shmem_rw() but adapting the api and removing the write support since there's currently only need to use dma_buf_map as destination. Reworking __shmem_rw() to share the

[PATCH 00/19] drm/i915/guc: Refactor ADS access to use dma_buf_map

2022-01-26 Thread Lucas De Marchi
While porting i915 to arm64 we noticed some issues accessing lmem. Some writes were getting corrupted and the final state of the buffer didn't have exactly what we wrote. This became evident when enabling GuC submission: depending on the number of engines the ADS struct was being corrupted and GuC

Re: [PATCH] drm/bridge: synopsys/dw-hdmi: set cec clock rate

2022-01-26 Thread Fabio Estevam
On Wed, Jan 26, 2022 at 5:25 PM Peter Geis wrote: > + > + ret = clk_set_rate(hdmi->cec_clk, HDMI_CEC_CLK_RATE); > + if (ret) > + dev_warn(hdmi->dev, "Cannot set HDMI cec clock rate: > %d\n", ret); You are setting the cec clock rate after it has

[PATCH] drm: rcar-du: Drop LVDS device tree backward compatibility

2022-01-26 Thread Laurent Pinchart
The rcar-du driver goes to great lengths to preserve device tree backward compatibility for the LVDS encoders by patching old device trees at runtime. The last R-Car Gen2 platform was converted to the new bindings commit edb0c3affe5214a2 ("ARM: dts: r8a7793: Convert to new LVDS DT bindings"), in

[PATCH] drm/bridge: synopsys/dw-hdmi: set cec clock rate

2022-01-26 Thread Peter Geis
The hdmi-cec clock must be 32khz in order for cec to work correctly. Ensure after enabling the clock we set it in order for the hardware to work as expected. Warn on failure, in case this is a static clock that is slighty off. Fixes hdmi-cec support on Rockchip devices. Fixes: ebe32c3e282a

Re: [PATCH 2/4] drm/i915/guc: Cancel requests immediately

2022-01-26 Thread Matthew Brost
On Wed, Jan 26, 2022 at 10:58:46AM -0800, John Harrison wrote: > On 1/24/2022 07:01, Matthew Brost wrote: > > Change the preemption timeout to the smallest possible value (1 us) when > > disabling scheduling to cancel a request and restore it after > > cancellation. This not only cancels the

Re: [PATCH 3/4] drm/i915/execlists: Fix execlists request cancellation corner case

2022-01-26 Thread Matthew Brost
On Wed, Jan 26, 2022 at 11:03:24AM -0800, John Harrison wrote: > On 1/24/2022 07:01, Matthew Brost wrote: > > More than 1 request can be submitted to a single ELSP at a time if > > multiple requests are ready run to on the same context. When a request > > is canceled it is marked bad, an idle

Re: [Intel-gfx] [PATCH 1/3] drm: Stop spamming log with drm_cache message

2022-01-26 Thread Lucas De Marchi
On Wed, Jan 26, 2022 at 08:24:54PM +0200, Jani Nikula wrote: On Tue, 25 Jan 2022, Lucas De Marchi wrote: Only x86 and in some cases PPC have support added in drm_cache.c for the clflush class of functions. However warning once is sufficient to taint the log instead of spamming it with

Re: [Intel-gfx] [PATCH 18/20] drm/i915/uapi: forbid ALLOC_TOPDOWN for error capture

2022-01-26 Thread kernel test robot
to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Matthew-Auld/Initial-support-for-small-BAR-recovery/20220126-232640 base: git://anongit.freedesktop.org/drm/drm-tip drm-tip config: x86_64-randconfig-a013-20220124 (https

Re: [PATCH 21/27] arm64: dts: rockchip: rk356x: Add HDMI nodes

2022-01-26 Thread Peter Geis
On Wed, Jan 26, 2022 at 2:25 PM Robin Murphy wrote: > > On 2022-01-26 18:44, Peter Geis wrote: > > On Wed, Jan 26, 2022 at 12:56 PM Robin Murphy wrote: > >> > >> On 2022-01-26 16:04, Peter Geis wrote: > >>> On Wed, Jan 26, 2022 at 9:58 AM Sascha Hauer > >>> wrote: > > Add support for

Re: [Intel-gfx] [PATCH 18/20] drm/i915/uapi: forbid ALLOC_TOPDOWN for error capture

2022-01-26 Thread kernel test robot
to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Matthew-Auld/Initial-support-for-small-BAR-recovery/20220126-232640 base: git://anongit.freedesktop.org/drm/drm-tip drm-tip config: i386-randconfig-a002-20220124 (https

Re: [PATCH 21/27] arm64: dts: rockchip: rk356x: Add HDMI nodes

2022-01-26 Thread Robin Murphy
On 2022-01-26 18:44, Peter Geis wrote: On Wed, Jan 26, 2022 at 12:56 PM Robin Murphy wrote: On 2022-01-26 16:04, Peter Geis wrote: On Wed, Jan 26, 2022 at 9:58 AM Sascha Hauer wrote: Add support for the HDMI port found on RK3568. Signed-off-by: Sascha Hauer ---

Re: [PATCH 3/4] drm/i915/execlists: Fix execlists request cancellation corner case

2022-01-26 Thread John Harrison
On 1/24/2022 07:01, Matthew Brost wrote: More than 1 request can be submitted to a single ELSP at a time if multiple requests are ready run to on the same context. When a request is canceled it is marked bad, an idle pulse is triggered to the engine (high priority kernel request), the execlists

Re: [PATCH 2/4] drm/i915/guc: Cancel requests immediately

2022-01-26 Thread John Harrison
On 1/24/2022 07:01, Matthew Brost wrote: Change the preemption timeout to the smallest possible value (1 us) when disabling scheduling to cancel a request and restore it after cancellation. This not only cancels the request as fast as possible, it fixes a bug where the preemption timeout is 0

Re: [PATCH 21/27] arm64: dts: rockchip: rk356x: Add HDMI nodes

2022-01-26 Thread Peter Geis
On Wed, Jan 26, 2022 at 12:56 PM Robin Murphy wrote: > > On 2022-01-26 16:04, Peter Geis wrote: > > On Wed, Jan 26, 2022 at 9:58 AM Sascha Hauer wrote: > >> > >> Add support for the HDMI port found on RK3568. > >> > >> Signed-off-by: Sascha Hauer > >> --- > >>

Re: [Intel-gfx] [PATCH 02/20] drm: implement top-down allocation method

2022-01-26 Thread Robert Beckett
On 26/01/2022 15:21, Matthew Auld wrote: From: Arunpravin Implemented a function which walk through the order list, compares the offset and returns the maximum offset block, this method is unpredictable in obtaining the high range address blocks which depends on allocation and deallocation.

Re: [Intel-gfx] [PATCH 1/3] drm: Stop spamming log with drm_cache message

2022-01-26 Thread Jani Nikula
On Tue, 25 Jan 2022, Lucas De Marchi wrote: > Only x86 and in some cases PPC have support added in drm_cache.c for the > clflush class of functions. However warning once is sufficient to taint > the log instead of spamming it with "Architecture has no drm_cache.c > support" every few millisecond.

Re: [Intel-gfx] [PATCH 01/20] drm: improve drm_buddy_alloc function

2022-01-26 Thread Jani Nikula
On Wed, 26 Jan 2022, Matthew Auld wrote: > From: Arunpravin > > - Make drm_buddy_alloc a single function to handle > range allocation and non-range allocation demands > > - Implemented a new function alloc_range() which allocates > the requested power-of-two block comply with range

Re: [PATCH 21/27] arm64: dts: rockchip: rk356x: Add HDMI nodes

2022-01-26 Thread Robin Murphy
On 2022-01-26 16:04, Peter Geis wrote: On Wed, Jan 26, 2022 at 9:58 AM Sascha Hauer wrote: Add support for the HDMI port found on RK3568. Signed-off-by: Sascha Hauer --- arch/arm64/boot/dts/rockchip/rk356x.dtsi | 37 +++- 1 file changed, 36 insertions(+), 1

Re: [PATCH v1 1/4] fbtft: Unorphan the driver

2022-01-26 Thread Jani Nikula
On Wed, 26 Jan 2022, Andy Shevchenko wrote: > And basically create a MIPI based driver for I2C. What does that even mean? BR, Jani. -- Jani Nikula, Intel Open Source Graphics Center

Re: [Intel-gfx] [PATCH v5 4/5] drm/i915: add gtt misalignment test

2022-01-26 Thread Robert Beckett
On 26/01/2022 14:05, Thomas Hellström (Intel) wrote: On 1/25/22 20:35, Robert Beckett wrote: add test to check handling of misaligned offsets and sizes v4: * remove spurious blank lines * explicitly cast intel_region_id to intel_memory_type in misaligned_pin Reported-by: kernel

  1   2   3   >