[PATCH v3] drm/i915: Fix page cleanup on DMA remap failure

2025-01-27 Thread Brian Geffon
t shmem_sg_free_table() to use a folio_batch") Signed-off-by: Brian Geffon Suggested-by: Tomasz Figa --- drivers/gpu/drm/i915/gem/i915_gem_shmem.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_shmem.c b/drivers/gpu/drm/i915/

Re: [PATCH v2] drm/i915: Fix page cleanup on DMA remap failure

2025-01-27 Thread Brian Geffon
On Mon, Jan 27, 2025 at 1:47 PM Ville Syrjälä wrote: > > On Thu, Jan 16, 2025 at 10:53:40AM -0500, Brian Geffon wrote: > > When converting to folios the cleanup path of shmem_get_pages() was > > missed. When a DMA remap fails and the max segment size is greater than > > P

Re: [PATCH v2] drm/i915: Fix page cleanup on DMA remap failure

2025-01-24 Thread Brian Geffon
On Wed, Jan 22, 2025 at 10:07 PM Srinivas, Vidya wrote: > > Hello Brian, Many thanks for the fix. I am adding my tested-by. > Tested-by: Vidya Srinivas Thanks for testing Vidya. Can we get a maintainer to take a look? > > > > -Original Message- > > From:

[PATCH v2] drm/i915: Fix page cleanup on DMA remap failure

2025-01-16 Thread Brian Geffon
rnel.org/lkml/20250116135636.410164-1-bgef...@google.com/ Fixes: 0b62af28f249 ("i915: convert shmem_sg_free_table() to use a folio_batch") Signed-off-by: Brian Geffon Suggested-by: Tomasz Figa --- drivers/gpu/drm/i915/gem/i915_gem_object.h | 3 +-- drivers/gpu/drm/i915/gem

Re: [PATCH] drm/i915: Fix page cleanup on DMA remap failure

2025-01-16 Thread Brian Geffon
On Thu, Jan 16, 2025 at 9:38 AM Ville Syrjälä wrote: > > On Thu, Jan 16, 2025 at 04:24:26PM +0200, Ville Syrjälä wrote: > > On Thu, Jan 16, 2025 at 08:56:36AM -0500, Brian Geffon wrote: > > > When converting to folios the cleanup path of shmem_get_pages() was > > >

Re: [PATCH] drm/i915: Fix page cleanup on DMA remap failure

2025-01-16 Thread Brian Geffon
On Thu, Jan 16, 2025 at 9:24 AM Ville Syrjälä wrote: > > On Thu, Jan 16, 2025 at 08:56:36AM -0500, Brian Geffon wrote: > > When converting to folios the cleanup path of shmem_get_pages() was > > missed. When a DMA remap fails and the max segment size is greater than > > P

Re: [PATCH] drm/i915: Fix page cleanup on DMA remap failure

2025-01-16 Thread Brian Geffon
On Thu, Jan 16, 2025 at 9:24 AM Ville Syrjälä wrote: > > On Thu, Jan 16, 2025 at 08:56:36AM -0500, Brian Geffon wrote: > > When converting to folios the cleanup path of shmem_get_pages() was > > missed. When a DMA remap fails and the max segment size is greater than > > P

[PATCH] drm/i915: Fix page cleanup on DMA remap failure

2025-01-16 Thread Brian Geffon
isn't handling compound pages correctly. Link: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13487 Fixes: 0b62af28f249 ("i915: convert shmem_sg_free_table() to use a folio_batch") Signed-off-by: Brian Geffon Suggested-by: Tomasz Figa --- drivers/gpu/drm/i915/gem/i

Re: [PATCH] drm/fourcc: add LINEAR modifiers with an exact pitch alignment

2024-12-20 Thread Brian Starkey
el raised. That needs addressing. On Thu, Dec 19, 2024 at 07:33:07PM +, Marek Olšák wrote: > On Thu, Dec 19, 2024 at 5:32 AM Brian Starkey wrote: > > > On Wed, Dec 18, 2024 at 09:53:56PM +, Marek Olšák wrote: > > The pitch doesn't always describe the layout. In prac

Re: [PATCH] drm/fourcc: add LINEAR modifiers with an exact pitch alignment

2024-12-19 Thread Brian Starkey
On Wed, Dec 18, 2024 at 09:53:56PM +, Marek Olšák wrote: > On Wed, Dec 18, 2024 at 5:32 AM Brian Starkey wrote: > > > On Wed, Dec 18, 2024 at 11:24:58AM +, Simona Vetter wrote: > > > > > > For that reason I think linear modifiers with explicit pitch/size &g

Re: [PATCH] drm/fourcc: add LINEAR modifiers with an exact pitch alignment

2024-12-18 Thread Brian Starkey
t is a "special" constraint (in that it's really a description of the buffer layout), and that constraints in-general shouldn't be exposed via modifiers? Cheers, -Brian

Re: [PATCH] drm/fourcc: add LINEAR modifiers with an exact pitch alignment

2024-12-17 Thread Brian Starkey
On Tue, Dec 17, 2024 at 11:13:05AM +, Michel Dänzer wrote: > On 2024-12-17 10:14, Brian Starkey wrote: > > On Sun, Dec 15, 2024 at 03:53:14PM +, Marek Olšák wrote: > >> The comment explains the problem with DRM_FORMAT_MOD_LINEAR. > >> > >> Signed-off-by:

Re: [PATCH] drm/fourcc: add LINEAR modifiers with an exact pitch alignment

2024-12-17 Thread Brian Starkey
y - it's a device constraint. It feels out of place to overload modifiers with it. I'm not saying we don't need a way to describe constraints to allocators, but I question if modifiers the right mechanism to communicate them? Cheers, -Brian

Re: [NOT A REGRESSION] firmware: framebuffer-coreboot: duplicate device name "simple-framebuffer.0"

2024-09-13 Thread Brian Norris
o prevent the issue, make the framebuffer_core driver to not register a > platform device if the global struct screen_info data has been filled. > > Reported-by: Brian Norris > Link: > https://lore.kernel.org/all/ZuCG-DggNThuF4pj@b20ea791c01f/T/#ma7fb65acbc1a56042258adac910992bb225a2

[NOT A REGRESSION] firmware: framebuffer-coreboot: duplicate device name "simple-framebuffer.0"

2024-09-10 Thread Brian Norris
rs should be switched to use PLATFORM_DEVID_AUTO? Or at least one of them. Or they should use different base names. I'm not really sure what the best option is (does anyone rely on or care about the device naming?), and I don't actually use this driver. But here's an untested dif

Re: Correct sequencing of usage of DRM writeback connector

2024-06-18 Thread Brian Starkey
ngle frames for static-screen and testing purposes, and there wasn't a consensus on how to make a streaming API, so we didn't do it. > Note, in my humble opinion, it should be perfectly possible to setup > writeback as a clone to the existing connector (if a clone mode is > su

Re: Correct sequencing of usage of DRM writeback connector

2024-06-17 Thread Brian Starkey
ew writeback every frame. It drains out the last of the data during vblank, before starting on the next frame. That doesn't help the "general case" though. > >If we already have devices where you can use writeback together with real >outputs, then I guess that counts as an oopsie :-/ Well "works fine" fits into the "undefined behaviour" bucket, just as well as "corrupts your fb" does :-) -Brian > >Cheers, Sima >-- >Daniel Vetter >Software Engineer, Intel Corporation >http://blog.ffwll.ch

Re: [PATCH 21/23] drm/xe/svm: GPU page fault support

2024-01-22 Thread Welty, Brian
Vishwanathapura Cc: Matthew Brost Cc: Thomas Hellström Cc: Brian Welty --- drivers/gpu/drm/xe/xe_gt_pagefault.c | 7 ++ drivers/gpu/drm/xe/xe_svm.c | 116 +++ drivers/gpu/drm/xe/xe_svm.h | 6 ++ drivers/gpu/drm/xe/xe_svm_range.c| 43 ++ 4

[PATCH] fbdev/simplefb: change loglevel when the power domains cannot be parsed

2023-12-12 Thread Brian Masney
When the power domains cannot be parsed, the message is incorrectly logged as an info message. Let's change this to an error since an error is returned. Fixes: 92a511a568e4 ("fbdev/simplefb: Add support for generic power-domains") Signed-off-by: Brian Masney --- drivers/video/f

Re: [Intel-xe] ttm_bo and multiple backing store segments

2023-08-03 Thread Welty, Brian
-0700, Welty, Brian wrote: Hi Christian / Thomas, Wanted to ask if you have explored or thought about adding support in TTM such that a ttm_bo could have more than one underlying backing store segment (that is, to have a tree of ttm_resources)? We already use something similar on amdgpu where

ttm_bo and multiple backing store segments

2023-06-29 Thread Welty, Brian
BO Or is the thinking that workloads should use SVM/HMM instead of GEM_CREATE if they want above benefits? Is this something you are open to seeing an RFC series that starts perhaps with just extending ttm_bo_validate() to see how this might shape up? -Brian

Re: [PATCH] drm/msm/adreno: Update MODULE_FIRMWARE macros

2023-06-16 Thread Brian Masney
/a650_zap.mdt"); > +MODULE_FIRMWARE("qcom/a660_gmu.bin"); > +MODULE_FIRMWARE("qcom/a660_sqe.fw"); > +MODULE_FIRMWARE("qcom/a660_zap.mdt"); > +MODULE_FIRMWARE("qcom/leia_pfp_470.fw"); > +MODULE_FIRMWARE("qcom/leia_pm4_470.fw"); > +MODULE_FIRMWARE("qcom/yamato_pfp.fw"); > +MODULE_FIRMWARE("qcom/yamato_pm4.fw"); You should rebase this on top of the latest -next since the a690 needs to be added as well. Brian

Re: [PATCH 1/1] drm/bridge: analogix_dp: add a quirk for Bob panel

2023-02-14 Thread Brian Norris
PSR enabled state. > + */ > + if (status == DP_PSR_SINK_ACTIVE_RFB) { > + if ((reg == DP_PSR_SINK_ACTIVE_RFB) && > + ((store == DP_PSR_SINK_ACTIVE_SINK_SYNCED) || > + (store == DP_PSR_SINK_AC

Re: [PATCH] drm: bridge: Use devm_platform_get_and_ioremap_resource()

2023-01-19 Thread Brian Norris
> clk_prepare_enable(dp->clock); > > - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - > - dp->reg_base = devm_ioremap_resource(&pdev->dev, res); > + dp->reg_base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL); Rather than a NULL 3rd

[PATCH v3 2/2] drm/rockchip: vop: Leave vblank enabled in self-refresh

2023-01-09 Thread Brian Norris
f course. v3: * no update v2: * skip unnecessary lock/unlock Fixes: 6c836d965bad ("drm/rockchip: Use the helpers for PSR") Cc: Link: https://lore.kernel.org/dri-devel/y5itf0+yniqa6...@sirena.org.uk/ Reported-by: "kernelci.org bot" Signed-off-by: Brian Norris --- drivers/gpu/

[PATCH v3 1/2] drm/atomic: Allow vblank-enabled + self-refresh "disable"

2023-01-09 Thread Brian Norris
lf-refresh * describe failing test case and relation to drm/rockchip patch better Cc: # dependency for "drm/rockchip: vop: Leave # vblank enabled in self-refresh" Signed-off-by: Brian Norris --- drivers/gpu/drm/drm_atomic_helper.c | 11 ++- 1 file chang

Re: [PATCH v2 1/2] drm/atomic: Allow vblank-enabled + self-refresh "disable"

2023-01-06 Thread Brian Norris
On Fri, Jan 6, 2023 at 5:23 PM Brian Norris wrote: > v2: > * add 'ret != 0' warning case for self-refresh > * describe failing test case and relation to drm/rockchip patch better Ugh, there's always something you remember right after you hit send: I forgot to better sum

[PATCH v2 2/2] drm/rockchip: vop: Leave vblank enabled in self-refresh

2023-01-06 Thread Brian Norris
"drm/rockchip: Use the helpers for PSR") Cc: Link: https://lore.kernel.org/dri-devel/y5itf0+yniqa6...@sirena.org.uk/ Reported-by: "kernelci.org bot" Signed-off-by: Brian Norris --- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 8 1 file changed, 4 insertions

[PATCH v2 1/2] drm/atomic: Allow vblank-enabled + self-refresh "disable"

2023-01-06 Thread Brian Norris
add 'ret != 0' warning case for self-refresh * describe failing test case and relation to drm/rockchip patch better Cc: # dependency for "drm/rockchip: vop: Leave # vblank enabled in self-refresh" Signed-off-by: Brian Norris --- drivers/gpu/drm/dr

Re: [PATCH 2/2] drm/rockchip: vop: Leave vblank enabled in self-refresh

2023-01-06 Thread Brian Norris
On Fri, Jan 06, 2023 at 12:42:54PM +0100, Michel Dänzer wrote: > On 1/6/23 02:40, Brian Norris wrote: > > --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c > > +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c > > @@ -719,11 +719,11 @@ static void vop_crtc_atomic_disable(struc

Re: [PATCH 1/2] drm/atomic: Allow vblank-enabled + self-refresh "disable"

2023-01-06 Thread Brian Norris
On Fri, Jan 06, 2023 at 09:30:56PM +0100, Daniel Vetter wrote: > On Fri, Jan 06, 2023 at 11:33:06AM -0800, Brian Norris wrote: > > On Fri, Jan 06, 2023 at 07:17:53PM +0100, Daniel Vetter wrote: > > > - check that drivers which use self_ref

Re: [PATCH 1/2] drm/atomic: Allow vblank-enabled + self-refresh "disable"

2023-01-06 Thread Brian Norris
y notice that this is "broken". I suppose it would only be IGT tests that notice. 5. I fixed up various upstream PSR bugs are part of #3 [0], along the way I unborked PSR enough that KernelCI finally caught the bug. See my explanation in [1] for why the vblank bug was masked, and

Re: [PATCH 1/2] drm/atomic: Allow vblank-enabled + self-refresh "disable"

2023-01-06 Thread Brian Norris
On Fri, Jan 06, 2023 at 07:20:40PM +0100, Daniel Vetter wrote: > On Fri, Jan 06, 2023 at 10:08:53AM -0800, Brian Norris wrote: > > OK! Then that sounds like it at least ACKs my general idea for this > > series. (Michel and I poked at a few ideas in the thread at [1] and > > l

Re: [PATCH 1/2] drm/atomic: Allow vblank-enabled + self-refresh "disable"

2023-01-06 Thread Brian Norris
Hi Daniel, On Fri, Jan 06, 2023 at 06:53:49PM +0100, Daniel Vetter wrote: > On Thu, Jan 05, 2023 at 05:40:17PM -0800, Brian Norris wrote: > > The self-refresh helper framework overloads "disable" to sometimes mean > > "go into self-refresh mode," and this mo

Re: renesas/master bisection: igt-kms-rockchip.kms_vblank.pipe-A-wait-forked on rk3399-gru-kevin

2023-01-05 Thread Brian Norris
On Thu, Jan 05, 2023 at 04:59:55PM -0800, Brian Norris wrote: > On Wed, Jan 04, 2023 at 10:11:46AM +0100, Michel Dänzer wrote: > > On 1/4/23 03:11, Brian Norris wrote: > > > On Tue, Jan 03, 2023 at 07:04:00PM +0100, Michel Dänzer wrote: > > >> On 12/21/22 23:02,

[PATCH 2/2] drm/rockchip: vop: Leave vblank enabled in self-refresh

2023-01-05 Thread Brian Norris
p on self refresh") as well. We also need the previous patch ("drm/atomic: Allow vblank-enabled + self-refresh "disable""), of course. Fixes: 6c836d965bad ("drm/rockchip: Use the helpers for PSR") Cc: Link: https://lore.kernel.org/dri-devel/y5itf0+yniqa6...@sire

[PATCH 1/2] drm/atomic: Allow vblank-enabled + self-refresh "disable"

2023-01-05 Thread Brian Norris
Cs to be "disabled" (with self-refresh active) with vblank interrupts still enabled. Cc: # dependency for subsequent patch Signed-off-by: Brian Norris --- drivers/gpu/drm/drm_atomic_helper.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/d

Re: renesas/master bisection: igt-kms-rockchip.kms_vblank.pipe-A-wait-forked on rk3399-gru-kevin

2023-01-05 Thread Brian Norris
On Wed, Jan 04, 2023 at 10:11:46AM +0100, Michel Dänzer wrote: > On 1/4/23 03:11, Brian Norris wrote: > > On Tue, Jan 03, 2023 at 07:04:00PM +0100, Michel Dänzer wrote: > >> On 12/21/22 23:02, Brian Norris wrote: > > > >>> 3. leave vblank enabled even in the

Re: renesas/master bisection: igt-kms-rockchip.kms_vblank.pipe-A-wait-forked on rk3399-gru-kevin

2023-01-03 Thread Brian Norris
Hi Michel, Thanks for your thoughts. I'll give my attempt at weighing my and your options, with the caveat that I'm still not much of a DRM expert. On Tue, Jan 03, 2023 at 07:04:00PM +0100, Michel Dänzer wrote: > On 12/21/22 23:02, Brian Norris wrote: > > So how to fix this?

Re: renesas/master bisection: igt-kms-rockchip.kms_vblank.pipe-A-wait-forked on rk3399-gru-kevin

2022-12-21 Thread Brian Norris
Hi Mark, Sean, (and dri-devel) On Wed, Dec 14, 2022 at 07:04:37PM -0800, Brian Norris wrote: > On Tue, Dec 13, 2022 at 04:51:11PM +, Mark Brown wrote: > > On Tue, Dec 13, 2022 at 05:56:30AM -0800, KernelCI bot wrote: > > > > The KernelCI bisection bot found regression

Re: renesas/master bisection: igt-kms-rockchip.kms_vblank.pipe-A-wait-forked on rk3399-gru-kevin

2022-12-14 Thread Brian Norris
8 In that case, there was actually an underlying kernel regression due to: 846c7dfc1193 drm/atomic: Try to preserve the crtc enabled state in drm_atomic_remove_fb, v2. But our tests were broken too (assuming an initial state that wasn't guaranteed), so we just fixed the tests. Anyway, I&

Re: [PATCH] drm/i915/huc: fix leak of debug object in huc load fence on driver unload

2022-11-16 Thread Brian Norris
ch can in turn > trigger a warning if we try to register a new debug offset at the same > address on driver reload. > > To fix the issue, make sure to always run the cleanup code. > > Reported-by: Tvrtko Ursulin > Reported-by: Brian Norris > Fixes: 27536e03271d ("drm

Re: [PATCH 1/2] drm/amdgpu: Move racy global PMU list into device

2022-11-08 Thread Brian Norris
PMU. I realized the one I tested on doesn't actually hit this code path... and this would be getting a little less obvious/trivial. > Other than that, the patch looks good to me. Thanks for looking! Brian

[PATCH] drm/rockchip: vop: Quiet always-warning AFBC log

2022-10-31 Thread Brian Norris
achable. And lastly, drop the unreachable return; we'd do better to let the compiler complain if we start hitting this unexpectedly. Signed-off-by: Brian Norris --- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a

[PATCH 2/2] drm/amdgpu: Set PROBE_PREFER_ASYNCHRONOUS

2022-10-28 Thread Brian Norris
ny cross-device dependencies or racy accesses to global state, so this should be safe. This driver was pinpointed as part of a survey of top slowest initcalls (i.e., are built in, and probing synchronously) on a lab of ChromeOS systems. Signed-off-by: Brian Norris --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv

[PATCH 1/2] drm/amdgpu: Move racy global PMU list into device

2022-10-28 Thread Brian Norris
If there are multiple amdgpu devices, this list processing can be racy. We're really treating this like a per-device list, so make that explicit and remove the global list. Signed-off-by: Brian Norris --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 4 drivers/gpu/drm/amd/a

[PATCH] drm/i915: Set PROBE_PREFER_ASYNCHRONOUS

2022-10-28 Thread Brian Norris
i915: Allow delayed i915 audio component binding") Signed-off-by: Brian Norris --- drivers/gpu/drm/i915/i915_pci.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c index 38460a0bd7cb..1cb1f87aea8

[PATCH 2/2] drm/rockchip: dsi: Force synchronous probe

2022-10-19 Thread Brian Norris
chronous probe, at least until this driver learns some appropriate locking for dual-DSI initialization. Cc: Signed-off-by: Brian Norris --- drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c b/dr

[PATCH 1/2] drm/rockchip: dsi: Clean up 'usage_mode' when failing to attach

2022-10-19 Thread Brian Norris
to hit when enabling asynchronous probe on a duel-DSI system (such as RK3399 Gru/Scarlet), such that we're more likely to fail dw_mipi_dsi_rockchip_find_second() the first time. Fixes: 71f68fe7f121 ("drm/rockchip: dsi: add ability to work as a phy instead of full dsi") Cc: Signed-off-by:

Re: [Intel-gfx] [PATCH 05/16] drm/i915/vm_bind: Implement bind and unbind of object

2022-09-28 Thread Welty, Brian
On 9/27/2022 11:19 PM, Niranjana Vishwanathapura wrote: Add uapi and implement support for bind and unbind of an object at the specified GPU virtual addresses. The vm_bind mode is not supported in legacy execbuf2 ioctl. It will be supported only in the newer execbuf3 ioctl. Signed-off-by: Ni

Re: [PATCH] drm/fourcc: Fix vsub/hsub for Q410 and Q401

2022-09-26 Thread Brian Starkey
On Tue, Sep 13, 2022 at 04:36:57PM +0100, Liviu Dudau wrote: > On Tue, Sep 13, 2022 at 03:43:06PM +0100, Brian Starkey wrote: > > These formats are not subsampled, but that means hsub and vsub should be > > 1, not 0. > > > > Fixes: 94b292b27734 ("drm: drm_fourcc:

[PATCH] drm/fourcc: Fix vsub/hsub for Q410 and Q401

2022-09-13 Thread Brian Starkey
These formats are not subsampled, but that means hsub and vsub should be 1, not 0. Fixes: 94b292b27734 ("drm: drm_fourcc: add NV15, Q410, Q401 YUV formats") Reported-by: George Kennedy Reported-by: butt3rflyh4ck Signed-off-by: Brian Starkey --- drivers/gpu/drm/drm_fourcc.c | 8 +

Re: [PATCH] Revert "drm: bridge: analogix/dp: add panel prepare/unprepare in suspend/resume time"

2022-09-12 Thread Brian Norris
On Thu, Aug 25, 2022 at 11:06 AM Brian Norris wrote: > On Thu, Aug 25, 2022 at 10:37 AM Doug Anderson wrote: > > Given that this is _not_ an area that I'm an expert in nor is it an > > area where the consequences are super easy to analyze, I'm a little > > hesitant

Re: [PATCH] Revert "drm: bridge: analogix/dp: add panel prepare/unprepare in suspend/resume time"

2022-08-25 Thread Brian Norris
use the up-to-date MAINTAINERS / .mailmap when generating CC lists), in case he's one such expert. Brian

[PATCH] Revert "drm: bridge: analogix/dp: add panel prepare/unprepare in suspend/resume time"

2022-08-24 Thread Brian Norris
fail. So remove the superfluous, possibly-harmful suspend()/resume() handling of panel state. Fixes: 211f276ed3d9 ("drm: bridge: analogix/dp: add panel prepare/unprepare in suspend/resume time") Link: https://lore.kernel.org/all/yv2cpbd3picg%2f...@google.com/ Signed-off-by: Brian Norris

Re: [PATCH -next] drm/bridge: Add missing clk_disable_unprepare() in analogix_dp_resume()

2022-08-24 Thread Brian Norris
uot;) > Signed-off-by: Zhang Zekun Reviewed-by: Brian Norris

Re: [PATCH -next] drm/bridge: Add missing clk_disable_unprepare() in analogix_dp_resume()

2022-08-22 Thread Brian Norris
Hi, On Wed, Aug 17, 2022 at 05:05:25PM -0700, Brian Norris wrote: > Hmm, actually I'm going to have to retract that now that I've given it > some more testing locally. I happen to have a system where I commonly > hit this error case, and I'm thinking commit 211f276ed3d9

Re: [PATCH -next] drm/bridge: Add missing clk_disable_unprepare() in analogix_dp_resume()

2022-08-17 Thread Brian Norris
On Wed, Aug 17, 2022 at 01:34:13PM -0700, Brian Norris wrote: > On Mon, Aug 15, 2022 at 11:46 PM Zhang Zekun wrote: > > > > Add the missing clk_disable_unprepare() before return from > > analogix_dp_resume() in the error handling case. > > > > Fixes: 211f276ed3d

Re: [EXT] Re: [PATCH 1/3] dma-buf: heaps: add Linaro secure dmabuf heap support

2022-08-17 Thread Brian Starkey
On Tue, Aug 16, 2022 at 11:20:50AM +, Olivier Masse wrote: > On ven., 2022-08-12 at 17:39 +0100, Brian Starkey wrote: > > On Mon, Aug 08, 2022 at 02:39:53PM +, Olivier Masse wrote: > > > On ven., 2022-08-05 at 16:41 +0100, Brian Starkey wrote: > > > > On F

Re: [EXT] Re: [PATCH 1/3] dma-buf: heaps: add Linaro secure dmabuf heap support

2022-08-12 Thread Brian Starkey
Hi, On Mon, Aug 08, 2022 at 02:39:53PM +, Olivier Masse wrote: > Hi Brian, > > On ven., 2022-08-05 at 16:41 +0100, Brian Starkey wrote: > > Caution: EXT Email > > > > Hi Olivier, > > > > Thanks, I think this is looking much better. > > >

Re: [PATCH 2/3] dt-bindings: reserved-memory: add linaro,secure-heap

2022-08-05 Thread Brian Starkey
+Rob and devicetree list. I don't know if this should be "linaro" or something more generic, and also where previous discussions got to about DMA heaps in DT. Cheers, -Brian On Fri, Aug 05, 2022 at 03:53:29PM +0200, Olivier Masse wrote: > DMABUF Reserved memory definition for

Re: [PATCH 1/3] dma-buf: heaps: add Linaro secure dmabuf heap support

2022-08-05 Thread Brian Starkey
name_len = 0; > + const char *s = rmem->name; > + > + secure_data[secure_data_count].base = rmem->base; > + secure_data[secure_data_count].size = rmem->size; > + > + while (name_len < MAX_HEAP_NAME_LEN) { > + if ((*s == '@') || (*s == '\0')) > + break; > + name_len++; > + s++; > + } > + if (name_len == MAX_HEAP_NAME_LEN) > + name_len--; > + > + strncpy(secure_data[secure_data_count].name, rmem->name, > name_len); I think it would be good to explicitly do: secure_data[secure_data_count].name[name_len] = '\0' I know it's zero-initialised, but that's done on a line far away, so may be best to be defensive. > + > + rmem->ops = &rmem_dma_ops; > + pr_info("Reserved memory: DMA buf secure pool %s at %pa, size > %ld MiB\n", > + secure_data[secure_data_count].name, > + &rmem->base, (unsigned long)rmem->size / SZ_1M); nit: What if rmem->size < SZ_1M, or not 1M-aligned > + > + secure_data_count++; > + return 0; > + } > + WARN_ONCE(1, "Cannot handle more than %u secure heaps\n", > MAX_SECURE_HEAP); > + return -EINVAL; > +} > + > +RESERVEDMEM_OF_DECLARE(secure_heap, "linaro,secure-heap", > rmem_secure_heap_setup); Is there anything linaro-specific about this? Could it be linux,secure-heap? Thanks, -Brian > + > +module_init(secure_heap_create); > +MODULE_LICENSE("GPL v2"); > -- > 2.25.0 >

Re: [PATCH 2/5] ANDROID: dma-buf: heaps: Add a shrinker controlled page pool

2022-08-03 Thread Brian Starkey
f a shrinker for that implementation may cause > additional low-memory kills > > TODO: Take another pass at trying to unify this w/ the ttm pool > > Thoughts and feedback would be greatly appreciated! Did I miss something, or is this not actually used anywhere? Thanks, -Brian

Re: [EXT] Re: [PATCH 3/5] dma-buf: heaps: add Linaro secure dmabuf heap support

2022-08-03 Thread Brian Starkey
Hi, On Wed, Aug 03, 2022 at 11:07:54AM +, Olivier Masse wrote: > Hi Brian, > > Thanks for your comments, please find my reply below. > > On mar., 2022-08-02 at 15:39 +0100, Brian Starkey wrote: > > Caution: EXT Email > > > > Hi Olivier, > > > >

Re: [PATCH 3/5] dma-buf: heaps: add Linaro secure dmabuf heap support

2022-08-02 Thread Brian Starkey
o free_pages; > + } > + > + return dmabuf; > + > +free_pages: > + sg_free_table(table); > + > +free_pool: > + gen_pool_free(info->pool, phy_addr, size); > + > +free_buffer: > + mutex_destroy(&buffer->lock); > + kfree(buffer); > +

Re: [PATCH v2 1/2] procfs: Add 'size' to /proc//fdinfo/

2022-06-30 Thread Brian Foster
On Thu, Jun 30, 2022 at 07:48:46AM -0400, Brian Foster wrote: > On Wed, Jun 29, 2022 at 01:43:11PM -0700, Kalesh Singh wrote: > > On Wed, Jun 29, 2022 at 5:23 AM Brian Foster wrote: > > > > > > On Tue, Jun 28, 2022 at 03:38:02PM -0700, Kalesh Singh wrote: > > &g

Re: [PATCH v2 1/2] procfs: Add 'size' to /proc//fdinfo/

2022-06-30 Thread Brian Foster
On Wed, Jun 29, 2022 at 01:43:11PM -0700, Kalesh Singh wrote: > On Wed, Jun 29, 2022 at 5:23 AM Brian Foster wrote: > > > > On Tue, Jun 28, 2022 at 03:38:02PM -0700, Kalesh Singh wrote: > > > On Tue, Jun 28, 2022 at 4:54 AM Brian Foster wrote: > > > > > &

Re: [PATCH v2 1/2] procfs: Add 'size' to /proc//fdinfo/

2022-06-29 Thread Brian Foster
On Tue, Jun 28, 2022 at 03:38:02PM -0700, Kalesh Singh wrote: > On Tue, Jun 28, 2022 at 4:54 AM Brian Foster wrote: > > > > On Thu, Jun 23, 2022 at 03:06:06PM -0700, Kalesh Singh wrote: > > > To be able to account the amount of memory a process is keeping pinned > >

Re: [PATCH v2 1/2] procfs: Add 'size' to /proc//fdinfo/

2022-06-28 Thread Brian Foster
not sure if it matters that much for your use case, but something worth noting at least with shmem is that one can do something like: # cat /proc/meminfo | grep Shmem: Shmem: 764 kB # xfs_io -fc "falloc -k 0 10m" ./file # ls -alh file -rw---. 1 root root 0 Jun 28 07:22 file # s

Re: [PATCH] drm/rockchip: vop: Don't crash for invalid duplicate_state()

2022-06-24 Thread Brian Norris
est, everything with a Fixes tag goes there.) Maybe? Anyway, if you want to "blame" anything, this commit actually dropped the safety check: 4e257d9eee23 drm/rockchip: get rid of rockchip_drm_crtc_mode_config Brian [1] But I'm not omniscient. So maybe it's good to have anyway.

[PATCH] drm/rockchip: vop: Don't crash for invalid duplicate_state()

2022-06-17 Thread Brian Norris
Signed-off-by: Brian Norris --- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c index 74562d40f639..daf192881353 100644 --- a/drivers/gpu/drm/rockchip/roc

Re: [PATCH v4] dma-buf: Add a capabilities directory

2022-06-07 Thread Brian Starkey
's not even funny. > What about dma-buf heaps? That should be a shorter route to getting a dma-buf fd if that's all that's needed. Cheers, -Brian

Re: [PATCH v2 0/2] drm/bridge: analogix_dp: Self-refresh state machine fixes

2022-06-06 Thread Brian Norris
ic: Force bridge self-refresh-exit on CRTC switch > ca871659ec16 drm/bridge: analogix_dp: Support PSR-exit to disable transition And thanks, Doug. Brian

Re: [PATCH v2 0/2] drm/bridge: analogix_dp: Self-refresh state machine fixes

2022-05-23 Thread Brian Norris
On Thu, Mar 10, 2022 at 3:50 PM Brian Norris wrote: > On Mon, Feb 28, 2022 at 12:25 PM Brian Norris > wrote: > Ping for review? Sean, perhaps? (You already reviewed this on the > Chromium tracker.) Ping

Re: [PATCH] drm/arm/malidp: Stop using iommu_present()

2022-04-06 Thread Brian Starkey
Hi Robin, On Tue, Apr 05, 2022 at 03:11:18PM +0100, Robin Murphy wrote: > iommu_get_domain_for_dev() is already perfectly happy to return NULL > if the given device has no IOMMU. Drop the unnecessary check. > > Signed-off-by: Robin Murphy LGTM, Acked-by: Brian Starkey I'll

Re: [PATCH] drm: Don't make DRM_PANEL_BRIDGE dependent on DRM_KMS_HELPERS

2022-03-16 Thread Brian Masney
> Cc: Maarten Lankhorst > Cc: Maxime Ripard > Cc: dri-devel@lists.freedesktop.org > Cc: Dave Airlie > Cc: Thierry Reding This patch fixes the build error that I see with qcom_defconfig in linux-next. Tested-by: Brian Masney

Re: [PATCH v2 0/2] drm/bridge: analogix_dp: Self-refresh state machine fixes

2022-03-10 Thread Brian Norris
On Mon, Feb 28, 2022 at 12:25 PM Brian Norris wrote: > > Hi, > > I've been investigating several eDP issues on a Rockchip RK3399 system > and have two proposed bugfixes. RK3399 has two CRTCs, either of which > can be used for eDP output. For both fixes, we have bugs du

[PATCH v4 2/2] drm/bridge: analogix_dp: Enable autosuspend

2022-03-01 Thread Brian Norris
DP AUX transactions can consist of many short operations. There's no need to power things up/down in short intervals. I pick an arbitrary 100ms; for the systems I'm testing (Rockchip RK3399), runtime-PM transitions only take a few microseconds. Signed-off-by: Brian Norris --- Cha

[PATCH v4 1/2] drm/bridge: analogix_dp: Grab runtime PM reference for DP-AUX

2022-03-01 Thread Brian Norris
t; the panel. Don't force any panel power-up, etc., because that can be intrusive, and that's not what other drivers do (see drivers/gpu/drm/bridge/ti-sn65dsi86.c and drivers/gpu/drm/bridge/parade-ps8640.c.) Fixes: 0d97ad03f422 ("drm/bridge: analogix_dp: Remove duplicated code&qu

Re: [PATCH v3 2/2] drm/bridge: analogix_dp: Enable autosuspend

2022-03-01 Thread Brian Norris
On Tue, Feb 22, 2022 at 2:10 PM Doug Anderson wrote: > On Thu, Feb 17, 2022 at 2:42 PM Brian Norris wrote: > > --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c > > +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c > > @@ -1121,7 +1121,7 @@ static int analogi

[PATCH v2 2/2] drm/atomic: Force bridge self-refresh-exit on CRTC switch

2022-02-28 Thread Brian Norris
ing PSR at the same time as a CRTC switch. (Thanks Liu Ying) Cc: Liu Ying Cc: Fixes: 1452c25b0e60 ("drm: Add helpers to kick off self refresh mode in drivers") Signed-off-by: Brian Norris --- drivers/gpu/drm/drm_atomic_helper.c | 16 +--- 1 file changed, 13 insertions(

[PATCH v2 1/2] drm/bridge: analogix_dp: Support PSR-exit to disable transition

2022-02-28 Thread Brian Norris
a while. It may predate the "PSR helpers" refactor, but the code looked very different before that, and it's probably not worth rewriting the fix. Cc: Fixes: 6c836d965bad ("drm/rockchip: Use the helpers for PSR") Signed-off-by: Brian Norris --- (no changes since v1) ..

[PATCH v2 0/2] drm/bridge: analogix_dp: Self-refresh state machine fixes

2022-02-28 Thread Brian Norris
en't explained issues well, or the proposals look fishy. Regards, Brian Changes in v2: - Drop "->enable" condition in crtc_needs_disable(); this could possibly be "->active" to reflect the intended hardware state, but it also is a little over-specific. We want to

Re: [PATCH 2/2] drm/atomic: Force bridge self-refresh-exit on CRTC switch

2022-02-28 Thread Brian Norris
Hi Liu, On Mon, Feb 28, 2022 at 1:02 AM Liu Ying wrote: > On Tue, 2022-02-15 at 15:54 -0800, Brian Norris wrote: > > --- a/drivers/gpu/drm/drm_atomic_helper.c > > +++ b/drivers/gpu/drm/drm_atomic_helper.c > > @@ -1011,9 +1011,19 @@ crtc_needs_disable(struct drm_

[PATCH v3 2/2] drm/bridge: analogix_dp: Enable autosuspend

2022-02-17 Thread Brian Norris
DP AUX transactions can consist of many short operations. There's no need to power things up/down in short intervals. I pick an arbitrary 100ms; for the systems I'm testing (Rockchip RK3399), runtime-PM transitions only take a few microseconds. Signed-off-by: Brian Norris --- Cha

[PATCH v3 1/2] drm/bridge: analogix_dp: Grab runtime PM reference for DP-AUX

2022-02-17 Thread Brian Norris
t; the panel. Don't force any panel power-up, etc., because that can be intrusive, and that's not what other drivers do (see drivers/gpu/drm/bridge/ti-sn65dsi86.c and drivers/gpu/drm/bridge/parade-ps8640.c.) Fixes: 0d97ad03f422 ("drm/bridge: analogix_dp: Remove duplicated code&qu

Re: [PATCH v2] drm/bridge: analogix_dp: Grab runtime PM reference for DP-AUX

2022-02-15 Thread Brian Norris
On Tue, Feb 15, 2022 at 3:46 PM Doug Anderson wrote: > On Tue, Feb 15, 2022 at 2:52 PM Brian Norris wrote: > > It still makes me wonder what the point > > of the /dev/drm_dp_aux interface is though, because it seems like > > you're pretty much destined to not have

[PATCH 1/2] drm/bridge: analogix_dp: Support PSR-exit to disable transition

2022-02-15 Thread Brian Norris
a while. It may predate the "PSR helpers" refactor, but the code looked very different before that, and it's probably not worth rewriting the fix. Cc: Fixes: 6c836d965bad ("drm/rockchip: Use the helpers for PSR") Signed-off-by: Brian Norris --- .../drm/br

[PATCH 2/2] drm/atomic: Force bridge self-refresh-exit on CRTC switch

2022-02-15 Thread Brian Norris
/drm/bridge/analogix/analogix_dp_core.c. Cc: Fixes: 1452c25b0e60 ("drm: Add helpers to kick off self refresh mode in drivers") Signed-off-by: Brian Norris --- drivers/gpu/drm/drm_atomic_helper.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/

[PATCH 0/2] drm/bridge: analogix_dp: Self-refresh state machine fixes

2022-02-15 Thread Brian Norris
en't explained issues well, or the proposals look fishy. Regards, Brian Brian Norris (2): drm/bridge: analogix_dp: Support PSR-exit to disable transition drm/atomic: Force bridge self-refresh-exit on CRTC switch .../drm/bridge/analogix/analogix_dp_core.c| 42 +--

Re: [PATCH v2] drm/bridge: analogix_dp: Grab runtime PM reference for DP-AUX

2022-02-15 Thread Brian Norris
On Tue, Feb 15, 2022 at 1:31 PM Doug Anderson wrote: > > Hi, Hi! > On Fri, Oct 1, 2021 at 2:50 PM Brian Norris wrote: > > > > If the display is not enable()d, then we aren't holding a runtime PM > > reference here. Thus, it's easy to accidentally caus

[PATCH] drm/rockchip: vop: Correct RK3399 VOP register fields

2022-01-19 Thread Brian Norris
ity according to the RK3399 TRM and fixed them up. This fixes IOMMU issues (and display errors) when testing with BG24 color formats. Fixes: 7707f7227f09 ("drm/rockchip: Add support for afbc") Cc: Andrzej Pietrasiewicz Cc: Signed-off-by: Brian Norris --- I'd appreciate notes or testi

Re: [PATCH v2 3/3] ASoC: rk3399_gru_sound: Wire up DP jack detection

2022-01-18 Thread Brian Norris
Hi Chen-Yu, On Mon, Jan 17, 2022 at 05:01:52PM +0800, Chen-Yu Tsai wrote: > On Sat, Jan 15, 2022 at 7:03 AM Brian Norris wrote: > > > > Now that the cdn-dp driver supports plug-change callbacks, let's wire it > > up. > > > > Signed-off-by: Brian Norris

[PATCH v2 3/3] ASoC: rk3399_gru_sound: Wire up DP jack detection

2022-01-14 Thread Brian Norris
Now that the cdn-dp driver supports plug-change callbacks, let's wire it up. Signed-off-by: Brian Norris --- (no changes since v1) sound/soc/rockchip/rk3399_gru_sound.c | 20 1 file changed, 20 insertions(+) diff --git a/sound/soc/rockchip/rk3399_gru_sound.c b/soun

[PATCH v2 2/3] drm/rockchip: cdn-dp: Support HDMI codec plug-change callback

2022-01-14 Thread Brian Norris
Some audio servers like to monitor a jack device (perhaps combined with EDID, for audio-presence info) to determine DP/HDMI audio presence. Signed-off-by: Brian Norris --- (no changes since v1) drivers/gpu/drm/rockchip/cdn-dp-core.c | 28 ++ drivers/gpu/drm/rockchip

[PATCH v2 1/3] arm64: dts: rockchip: Switch RK3399-Gru DP to SPDIF output

2022-01-14 Thread Brian Norris
d by a different function (on scarlet), which causes probe failures (!!) Fixes: b18c6c3c7768 ("ASoC: rockchip: cdn-dp sound output use spdif") Signed-off-by: Brian Norris --- Changes in v2: - (Un)set pinctrl, because the default assumes we're routing out to external pi

[PATCH v2 0/3] (Re)enable DP/HDMI audio for RK3399 Gru

2022-01-14 Thread Brian Norris
never upstreamed, because the hdmi-codec dependencies were still being worked out when this platform was first supported. Patches cover a few subsystems. Perhaps this is something for arm-soc? Changes in v2: - (Un)set pinctrl, because the default assumes we're routing out to external p

Re: [PATCH 1/3] arm64: dts: rockchip: Switch RK3399-Gru DP to SPDIF output

2022-01-14 Thread Brian Norris
Sorry to send a self-reply so quickly, but I noticed an error and want to make sure this doesn't get merged _too_ quickly before I get to send a revision! See below: On Fri, Jan 14, 2022 at 12:17 PM Brian Norris wrote: > > Commit b18c6c3c7768 ("ASoC: rockchip: cdn-dp sound

[PATCH 2/3] drm/rockchip: cdn-dp: Support HDMI codec plug-change callback

2022-01-14 Thread Brian Norris
Some audio servers like to monitor a jack device (perhaps combined with EDID, for audio-presence info) to determine DP/HDMI audio presence. Signed-off-by: Brian Norris --- drivers/gpu/drm/rockchip/cdn-dp-core.c | 28 ++ drivers/gpu/drm/rockchip/cdn-dp-core.h | 4

[PATCH 3/3] ASoC: rk3399_gru_sound: Wire up DP jack detection

2022-01-14 Thread Brian Norris
Now that the cdn-dp driver supports plug-change callbacks, let's wire it up. Signed-off-by: Brian Norris --- sound/soc/rockchip/rk3399_gru_sound.c | 20 1 file changed, 20 insertions(+) diff --git a/sound/soc/rockchip/rk3399_gru_sound.c b/sound/soc/roc

  1   2   3   4   5   6   7   8   9   10   >