Re: [PATCH v6 6/8] drm/i915/pxp: MTL-KCR interrupt ctrl's are in GT-0

2023-04-05 Thread Teres Alexis, Alan Previn
> alan:snip > >   void intel_pxp_irq_enable(struct intel_pxp *pxp) > >   { > > - struct intel_gt *gt = pxp->ctrl_gt; > > + struct intel_gt *gt = intel_pxp_get_irq_gt(pxp); > > in this function we use the gt for: > > 1 - the lock: see above about this > > 2 - gen11_gt_reset_one_iir(): this

Re: [PATCH v30 0/7] Add MediaTek SoC DRM (vdosys1) support for mt8195

2023-04-05 Thread Chen-Yu Tsai
On Mon, Apr 3, 2023 at 5:47 PM Krzysztof Kozlowski wrote: > > On 03/04/2023 05:30, Chun-Kuang Hu wrote: > > Hi, Chen-yu: > > > > Chen-Yu Tsai 於 2023年3月30日 週四 下午7:05寫道: > >> > >> On Mon, Mar 27, 2023 at 11:17 PM Chun-Kuang Hu > >> wrote: > >>> > >>> Hi, Angelo: > >>> > >>> AngeloGioacchino Del

Re: [PATCH v6 7/8] drm/i915/pxp: On MTL, KCR enabling doesn't wait on tee component

2023-04-05 Thread Teres Alexis, Alan Previn
> alan:snip > > @@ -140,10 +141,15 @@ static void pxp_init_full(struct intel_pxp *pxp) > > if (ret) > > return; > > > > - if (HAS_ENGINE(pxp->ctrl_gt, GSC0)) > > + if (HAS_ENGINE(pxp->ctrl_gt, GSC0)) { > > ret = intel_pxp_gsccs_init(pxp); > > - else > > +

Re: [Intel-gfx] [PATCH] drm/atomic-helper: Don't set deadline for modesets

2023-04-05 Thread Daniel Vetter
On Wed, Apr 05, 2023 at 06:50:22AM -0700, Rob Clark wrote: > On Wed, Apr 5, 2023 at 6:31 AM Daniel Vetter wrote: > > > > If the crtc is being switched on or off then the semantics of > > computing the timestampe of the next vblank is somewhat ill-defined. > > And indeed, the code splats with a

Re: [PATCH RFC 18/18] drm/asahi: Add the Asahi driver for Apple AGX GPUs

2023-04-05 Thread Asahi Lina
Same as the prior email, this was supposed to go to Daniel... On 06/04/2023 14.02, Asahi Lina wrote: On 05/04/2023 23.44, Daniel Vetter wrote: On Tue, Mar 07, 2023 at 11:25:43PM +0900, Asahi Lina wrote: +/// Look up a GEM object handle for a `File` and return an `ObjectRef` for it.

Re: [PATCH RFC 18/18] drm/asahi: Add the Asahi driver for Apple AGX GPUs

2023-04-05 Thread Asahi Lina
Argh. This (and my other reply) was supposed to go to Daniel, but Thunderbird... just dropped that recipient? And then my silly brain saw all the Cc:s go to To: and figured it was some weird consolidation and so I moved everything to Cc: except the only name that started with "Da" and... yeah,

Re: [Intel-gfx] [PATCH] i915/guc/slpc: Provide sysfs for efficient freq

2023-04-05 Thread Dixit, Ashutosh
On Wed, 05 Apr 2023 13:12:29 -0700, Rodrigo Vivi wrote: > > On Wed, Apr 05, 2023 at 12:42:30PM -0700, Dixit, Ashutosh wrote: > > On Wed, 05 Apr 2023 06:57:42 -0700, Rodrigo Vivi wrote: > > > Hi Rodrigo, > > > > > On Fri, Mar 31, 2023 at 08:11:29PM -0700, Dixit, Ashutosh wrote: > > > > On Fri, 31

Re: [PATCH RFC 18/18] drm/asahi: Add the Asahi driver for Apple AGX GPUs

2023-04-05 Thread Asahi Lina
On 05/04/2023 23.44, Daniel Vetter wrote: On Tue, Mar 07, 2023 at 11:25:43PM +0900, Asahi Lina wrote: +/// Look up a GEM object handle for a `File` and return an `ObjectRef` for it. +pub(crate) fn lookup_handle(file: , handle: u32) -> Result { +

Re: [Intel-gfx] [PATCH] drm/i915/guc: Disable PL1 power limit when loading GuC firmware

2023-04-05 Thread Dixit, Ashutosh
On Tue, 28 Mar 2023 02:14:42 -0700, Tvrtko Ursulin wrote: > Hi Tvrtko, > On 27/03/2023 18:47, Rodrigo Vivi wrote: > > > > +Daniel > > > > On Mon, Mar 27, 2023 at 09:58:52AM -0700, Dixit, Ashutosh wrote: > >> On Sun, 26 Mar 2023 04:52:59 -0700, Rodrigo Vivi wrote: > >>> > >> > >> Hi Rodrigo, > >>

Re: [Intel-gfx] [PATCH] drm/i915/guc: Disable PL1 power limit when loading GuC firmware

2023-04-05 Thread Dixit, Ashutosh
On Mon, 27 Mar 2023 10:47:25 -0700, Rodrigo Vivi wrote: > Hi Rodrigo, Sorry for the delay, I got pulled away into a couple of other things and could only now get back to this. > > +Daniel > > On Mon, Mar 27, 2023 at 09:58:52AM -0700, Dixit, Ashutosh wrote: > > On Sun, 26 Mar 2023 04:52:59

[PATCH 2/3] drm/i915/guc: Disable PL1 power limit when loading GuC firmware

2023-04-05 Thread Ashutosh Dixit
On dGfx, the PL1 power limit being enabled and set to a low value results in a low GPU operating freq. It also negates the freq raise operation which is done before GuC firmware load. As a result GuC firmware load can time out. Such timeouts were seen in the GL #8062 bug below (where the PL1 power

[PATCH 1/3] drm/i915/hwmon: Get mutex and rpm ref just once in hwm_power_max_write

2023-04-05 Thread Ashutosh Dixit
In preparation for follow-on patches, refactor hwm_power_max_write to take hwmon_lock and runtime pm wakeref at start of the function and release them at the end, therefore acquiring these just once each. Signed-off-by: Ashutosh Dixit --- drivers/gpu/drm/i915/i915_hwmon.c | 28

[PATCH 3/3] drm/i915/hwmon: Block waiting for GuC reset to complete

2023-04-05 Thread Ashutosh Dixit
Instead of erroring out when GuC reset is in progress, block waiting for GuC reset to complete which is a more reasonable uapi behavior. Signed-off-by: Ashutosh Dixit --- drivers/gpu/drm/i915/i915_hwmon.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git

[PATCH v4 0/3] drm/i915/guc: Disable PL1 power limit when loading GuC firmware

2023-04-05 Thread Ashutosh Dixit
Split the v3 patch into 3 patches for easier review, can squash later if needed. Cc: Rodrigo Vivi Cc: Tvrtko Ursulin Ashutosh Dixit (3): drm/i915/hwmon: Get mutex and rpm ref just once in hwm_power_max_write drm/i915/guc: Disable PL1 power limit when loading GuC firmware drm/i915/hwmon:

Re: [PATCH RFC 18/18] drm/asahi: Add the Asahi driver for Apple AGX GPUs

2023-04-05 Thread Asahi Lina
On 05/04/2023 23.37, Daniel Vetter wrote: On Tue, Mar 07, 2023 at 11:25:43PM +0900, Asahi Lina wrote: +/// A generic monotonically incrementing ID used to uniquely identify object instances within the +/// driver. +pub(crate) struct ID(AtomicU64); + +impl ID { +/// Create a new ID counter

Re: [RFC PATCH 00/10] Xe DRM scheduler and long running workload plans

2023-04-05 Thread Matthew Brost
On Wed, Apr 05, 2023 at 12:12:27PM +0200, Daniel Vetter wrote: > On Wed, 5 Apr 2023 at 11:57, Christian König wrote: > > > > Am 05.04.23 um 11:07 schrieb Daniel Vetter: > > > [SNIP] > > >> I would approach it from the complete other side. This component here is > > >> a > > >> tool to decide

Re: [PATCH v2 2/2] drm: bridge: cdns-mhdp8546: Add support for no-hpd

2023-04-05 Thread Laurent Pinchart
Hi Jayesh, Thank you for the patch. On Wed, Apr 05, 2023 at 07:54:40PM +0530, Jayesh Choudhary wrote: > From: Rahul T R > > In J721S2 EVMs DP0 hpd is not connected to correct > hpd pin on SOC, to handle such cases, Add support for > "no-hpd" property in the device tree node to disable > hpd

Re: [PATCH v2 1/2] dt-bindings: drm/bridge: Add no-hpd property

2023-04-05 Thread Laurent Pinchart
Hi Jayesh, Thank you for the patch. On Wed, Apr 05, 2023 at 07:54:39PM +0530, Jayesh Choudhary wrote: > From: Rahul T R > > The mhdp bridge can work without its HPD pin hooked up to the connector, > but the current bridge driver throws an error when hpd line is not > connected to the

[Bug 215631] Some Desktop oriented mode setting drivers are missing DRM PRIME support

2023-04-05 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=215631 --- Comment #1 from bluescreen_aven...@verizon.net --- I have been informed that 41068c8b28e16f1c2c26c854271520e1f3afaa22 in drm-misc-next should fix it for all the mentioned drivers in the list, except for gma500, ...and I have tested it, and it

Re: [RFC PATCH 08/10] dma-buf/dma-fence: Introduce long-running completion fences

2023-04-05 Thread Matthew Brost
On Wed, Apr 05, 2023 at 03:09:08PM +0200, Daniel Vetter wrote: > On Tue, Apr 04, 2023 at 07:48:27PM +, Matthew Brost wrote: > > On Tue, Apr 04, 2023 at 09:25:52PM +0200, Daniel Vetter wrote: > > > On Tue, Apr 04, 2023 at 07:02:23PM +, Matthew Brost wrote: > > > > On Tue, Apr 04, 2023 at

Re: [PATCH v4 1/6] drm/msm: Add MSM-specific DSC helper methods

2023-04-05 Thread Dmitry Baryshkov
On 06/04/2023 02:34, Abhinav Kumar wrote: On 4/5/2023 12:26 PM, Dmitry Baryshkov wrote: On 05/04/2023 03:41, Jessica Zhang wrote: Introduce MSM-specific DSC helper methods, as some calculations are common between DP and DSC. Changes in v2: - Moved files up to msm/ directory - Dropped

Re: [PATCH v4 1/6] drm/msm: Add MSM-specific DSC helper methods

2023-04-05 Thread Abhinav Kumar
On 4/5/2023 12:26 PM, Dmitry Baryshkov wrote: On 05/04/2023 03:41, Jessica Zhang wrote: Introduce MSM-specific DSC helper methods, as some calculations are common between DP and DSC. Changes in v2: - Moved files up to msm/ directory - Dropped get_comp_ratio() helper - Used drm_int2fixp() to

RE: [Intel-gfx] [PATCH 7/7] drm/i915: Allow user to set cache at BO creation

2023-04-05 Thread Yang, Fei
>Subject: Re: [Intel-gfx] [PATCH 7/7] drm/i915: Allow user to set cache at BO >creation > >On 04/04/2023 19:04, Yang, Fei wrote: >>> Subject: Re: [Intel-gfx] [PATCH 7/7] drm/i915: Allow user to set >>> cache at BO creation >>> >>> On 01/04/2023 09:38, fei.y...@intel.com wrote: From: Fei Yang

Re: [Freedreno] [PATCH v4 1/6] drm/msm: Add MSM-specific DSC helper methods

2023-04-05 Thread Dmitry Baryshkov
On 06/04/2023 01:02, Jessica Zhang wrote: On 4/5/2023 12:26 PM, Dmitry Baryshkov wrote: On 05/04/2023 03:41, Jessica Zhang wrote: Introduce MSM-specific DSC helper methods, as some calculations are common between DP and DSC. Changes in v2: - Moved files up to msm/ directory - Dropped

Re: [Freedreno] [PATCH v4 1/6] drm/msm: Add MSM-specific DSC helper methods

2023-04-05 Thread Jessica Zhang
On 4/5/2023 12:26 PM, Dmitry Baryshkov wrote: On 05/04/2023 03:41, Jessica Zhang wrote: Introduce MSM-specific DSC helper methods, as some calculations are common between DP and DSC. Changes in v2: - Moved files up to msm/ directory - Dropped get_comp_ratio() helper - Used drm_int2fixp() to

Re: [PATCH] drm/i915/guc: Don't capture Gen8 regs on Gen12 devices

2023-04-05 Thread Matt Roper
On Wed, Apr 05, 2023 at 02:13:31PM -0700, John Harrison wrote: > On 4/3/2023 17:34, Matt Roper wrote: > > On Mon, Apr 03, 2023 at 02:33:34PM -0700, john.c.harri...@intel.com wrote: > > > From: John Harrison > > > > > > A pair of pre-Gen12 registers were being included in the Gen12 capture > > >

Re: [PATCH] drm/i915/guc: Don't capture Gen8 regs on Gen12 devices

2023-04-05 Thread John Harrison
On 4/3/2023 17:34, Matt Roper wrote: On Mon, Apr 03, 2023 at 02:33:34PM -0700, john.c.harri...@intel.com wrote: From: John Harrison A pair of pre-Gen12 registers were being included in the Gen12 capture list. GuC was rejecting those as being invalid and logging errors about them. So, stop

Re: [PATCH 3/3] drm/fb-helper: fix input validation gaps in check_var

2023-04-05 Thread Javier Martinez Canillas
Daniel Vetter writes: > On Wed, Apr 05, 2023 at 07:42:08PM +0200, Javier Martinez Canillas wrote: [...] >> >> Ah, your patch adds it after that indeed. Please ignore my comment then. >> > >> > So rb: you? >> > >> >> Yes, I already provided it in my previous email and has been picked by >>

Re: [Regression] drm/scheduler: track GPU active time per entity

2023-04-05 Thread Luben Tuikov
On 2023-04-05 13:44, Lucas Stach wrote: > Hi Luben, > > Am Dienstag, dem 04.04.2023 um 00:31 -0400 schrieb Luben Tuikov: >> On 2023-03-28 04:54, Lucas Stach wrote: >>> Hi Danilo, >>> >>> Am Dienstag, dem 28.03.2023 um 02:57 +0200 schrieb Danilo Krummrich: Hi all, Commit

Re: [PATCH 3/3] drm/fb-helper: fix input validation gaps in check_var

2023-04-05 Thread Daniel Vetter
On Wed, Apr 05, 2023 at 07:42:08PM +0200, Javier Martinez Canillas wrote: > Daniel Vetter writes: > > > On Wed, Apr 05, 2023 at 06:27:17PM +0200, Javier Martinez Canillas wrote: > >> Daniel Vetter writes: > > [...] > > >> > > >> > The __fill_var is after this. I'm honestly not sure what the

Re: [PATCH v4 4/6] drm/msm/dsi: Use MSM and DRM DSC helper methods

2023-04-05 Thread Jessica Zhang
On 4/5/2023 12:27 PM, Dmitry Baryshkov wrote: On 05/04/2023 03:41, Jessica Zhang wrote: Use MSM and DRM DSC helper methods to configure DSC for DSI. Changes in V2: - *_calculate_initial_scale_value --> *_set_initial_scale_value - Split pkt_per_line and eol_byte_num changes to a separate

Re: [Intel-gfx] [PATCH 7/7] drm/i915: Allow user to set cache at BO creation

2023-04-05 Thread Jordan Justen
On 2023-04-05 00:45:24, Lionel Landwerlin wrote: > On 04/04/2023 19:04, Yang, Fei wrote: > >> Subject: Re: [Intel-gfx] [PATCH 7/7] drm/i915: Allow user to set cache at > >> BO creation > >> > >> Just like the protected content uAPI, there is no way for userspace to tell > >> this feature is

Re: [Intel-gfx] [PATCH] i915/guc/slpc: Provide sysfs for efficient freq

2023-04-05 Thread Rodrigo Vivi
On Wed, Apr 05, 2023 at 12:42:30PM -0700, Dixit, Ashutosh wrote: > On Wed, 05 Apr 2023 06:57:42 -0700, Rodrigo Vivi wrote: > > > > Hi Rodrigo, > > > On Fri, Mar 31, 2023 at 08:11:29PM -0700, Dixit, Ashutosh wrote: > > > On Fri, 31 Mar 2023 19:00:49 -0700, Vinay Belgaumkar wrote: > > > > > > > >

[PATCH] drm/doc/rfc: Introduce the merge plan for the Xe driver.

2023-04-05 Thread Rodrigo Vivi
Let’s establish a merge plan for Xe, by writing down clear pre-merge goals, in order to avoid unnecessary delays. This initial document starts with a TODO list containing items with clear and measurable key results. Xe’s initial pull request should only be sent to dri-devel after all the items

Re: [Intel-gfx] [PATCH] i915/guc/slpc: Provide sysfs for efficient freq

2023-04-05 Thread Dixit, Ashutosh
On Wed, 05 Apr 2023 06:57:42 -0700, Rodrigo Vivi wrote: > Hi Rodrigo, > On Fri, Mar 31, 2023 at 08:11:29PM -0700, Dixit, Ashutosh wrote: > > On Fri, 31 Mar 2023 19:00:49 -0700, Vinay Belgaumkar wrote: > > > > > > > Hi Vinay, > > > > > @@ -478,20 +507,15 @@ int intel_guc_slpc_set_min_freq(struct

Re: [PATCH RFC 12/18] rust: drm: sched: Add GPU scheduler abstraction

2023-04-05 Thread Daniel Vetter
On Wed, Apr 05, 2023 at 05:43:01PM +0200, Daniel Vetter wrote: > On Tue, Mar 07, 2023 at 11:25:37PM +0900, Asahi Lina wrote: > > +/// An armed DRM scheduler job (not yet submitted) > > +pub struct ArmedJob<'a, T: JobImpl>(Box>, PhantomData<&'a T>); > > + > > +impl<'a, T: JobImpl> ArmedJob<'a, T> {

Re: [PATCH v4 6/6] drm/msm/dsi: Fix calculations pkt_per_line

2023-04-05 Thread Dmitry Baryshkov
On 05/04/2023 03:41, Jessica Zhang wrote: Currently, pkt_per_line is calculated by dividing slice_per_intf by slice_count. This is incorrect, as slice_per_intf should be divided by slice_per_pkt, which is not always equivalent to slice_count as it is possible for there to be multiple soft slices

Re: [PATCH v4 5/6] drm/msm/dsi: update hdisplay calculation for dsi_timing_setup

2023-04-05 Thread Dmitry Baryshkov
On 05/04/2023 03:41, Jessica Zhang wrote: hdisplay for compressed images should be calculated as bytes_per_slice * slice_count. Thus, use MSM DSC helper to calculate hdisplay for dsi_timing_setup instead of directly using mode->hdisplay. Changes in v3: - Split from previous patch - Initialized

Re: [PATCH v4 4/6] drm/msm/dsi: Use MSM and DRM DSC helper methods

2023-04-05 Thread Dmitry Baryshkov
On 05/04/2023 03:41, Jessica Zhang wrote: Use MSM and DRM DSC helper methods to configure DSC for DSI. Changes in V2: - *_calculate_initial_scale_value --> *_set_initial_scale_value - Split pkt_per_line and eol_byte_num changes to a separate patch - Moved pclk_per_line calculation to hdisplay

Re: [PATCH v4 3/6] drm/msm/dpu: Fix slice_last_group_size calculation

2023-04-05 Thread Dmitry Baryshkov
On 05/04/2023 03:41, Jessica Zhang wrote: Correct the math for slice_last_group_size so that it matches the calculations downstream. Changes in v3: - Reworded slice_last_group_size calculation to `(dsc->slice_width + 2) % 3` Fixes: c110cfd1753e ("drm/msm/disp/dpu1: Add support for DSC")

Re: [PATCH v4 1/6] drm/msm: Add MSM-specific DSC helper methods

2023-04-05 Thread Dmitry Baryshkov
On 05/04/2023 03:41, Jessica Zhang wrote: Introduce MSM-specific DSC helper methods, as some calculations are common between DP and DSC. Changes in v2: - Moved files up to msm/ directory - Dropped get_comp_ratio() helper - Used drm_int2fixp() to convert to integers to fp - Style changes to

Re: [PULL] drm-misc-fixes

2023-04-05 Thread Daniel Vetter
On Wed, Apr 05, 2023 at 08:28:55PM +0200, Thomas Zimmermann wrote: > Hi Dave and Daniel, > > here's this week's PR for drm-misc-fixes. As requested, it comes > a day earlier than usual due to Easter holidays. > > Best regards > Thomas > > drm-misc-fixes-2023-04-05: > Short summary of fixes

Re: [RFC PATCH 00/10] Xe DRM scheduler and long running workload plans

2023-04-05 Thread Matthew Brost
On Wed, Apr 05, 2023 at 12:06:53PM -0600, Zeng, Oak wrote: > Hi, > > Using dma-fence for completion/dependency tracking for long-run workload(more > precisely on-demand paging/page fault enabled workload) can cause deadlock. > This seems the significant issue here. Other issues such as the drm

[linux-next:master] BUILD REGRESSION 8417c8f5007bf4567ccffda850a3157c7d905f67

2023-04-05 Thread kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master branch HEAD: 8417c8f5007bf4567ccffda850a3157c7d905f67 Add linux-next specific files for 20230405 Error/Warning reports: https://lore.kernel.org/oe-kbuild-all/202303161521.jbgbafjj-...@intel.com Error

Re: [PATCH 01/18] fbdev: Prepare generic architecture helpers

2023-04-05 Thread Thomas Zimmermann
Hi Am 05.04.23 um 17:53 schrieb Arnd Bergmann: On Wed, Apr 5, 2023, at 17:05, Thomas Zimmermann wrote: Generic implementations of fb_pgprotect() and fb_is_primary_device() have been in the source code for a long time. Prepare the header file to make use of them. Improve the code by using an

Re: [RFC PATCH 02/10] drm/sched: Move schedule policy to scheduler / entity

2023-04-05 Thread Matthew Brost
On Wed, Apr 05, 2023 at 01:37:22PM -0400, Luben Tuikov wrote: > Hi, > > Inlined: > Thanks for the feedback. > On 2023-04-03 20:22, Matthew Brost wrote: > > Rather than a global modparam for scheduling policy, move the scheduling > > policy to scheduler / entity so user can control each

[PULL] drm-misc-fixes

2023-04-05 Thread Thomas Zimmermann
Hi Dave and Daniel, here's this week's PR for drm-misc-fixes. As requested, it comes a day earlier than usual due to Easter holidays. Best regards Thomas drm-misc-fixes-2023-04-05: Short summary of fixes pull: * ivpu: DMA fence and suspend fixes * nouveau: Color-depth fixes * panfrost: Fix

Re: [PATCH] drm/amd/display: Fix potential null dereference

2023-04-05 Thread Hamza Mahfooz
On 4/3/23 09:10, Igor Artemiev wrote: The adev->dm.dc pointer can be NULL and dereferenced in amdgpu_dm_fini() without checking. Add a NULL pointer check before calling dc_dmub_srv_destroy(). Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 9a71c7d31734

Re: [PATCH] drm/scheduler: Fix UAF race in drm_sched_entity_push_job()

2023-04-05 Thread Luben Tuikov
On 2023-04-05 12:37, Asahi Lina wrote: > After a job is pushed into the queue, it is owned by the scheduler core > and may be freed at any time, so we can't write nor read the submit > timestamp after that point. > > Fixes oopses observed with the drm/asahi driver, found with kASAN. > >

Re: [PATCH] drm/scheduler: Fix UAF in drm_sched_fence_get_timeline_name

2023-04-05 Thread Luben Tuikov
On 2023-04-05 12:34, Asahi Lina wrote: > A signaled scheduler fence can outlive its scheduler, since fences are > independently reference counted. Therefore, we can't reference the > scheduler in the get_timeline_name() implementation. > > Fixes oopses on `cat /sys/kernel/debug/dma_buf/bufinfo`

RE: [RFC PATCH 00/10] Xe DRM scheduler and long running workload plans

2023-04-05 Thread Zeng, Oak
Hi, Using dma-fence for completion/dependency tracking for long-run workload(more precisely on-demand paging/page fault enabled workload) can cause deadlock. This seems the significant issue here. Other issues such as the drm scheduler completion order implication etc are minors which can be

Re: [Intel-gfx] [PATCH 1/8] drm/gma500: Use drm_aperture_remove_conflicting_pci_framebuffers

2023-04-05 Thread Patrik Jakobsson
On Wed, Apr 5, 2023 at 7:15 PM Daniel Vetter wrote: > > On Wed, 5 Apr 2023 at 18:54, Javier Martinez Canillas > wrote: > > > > Daniel Vetter writes: > > > > > On Wed, Apr 05, 2023 at 04:32:19PM +0200, Thomas Zimmermann wrote: > > > > [...] > > > > >> > > >/* > > >> > > > *

Re: [Regression] drm/scheduler: track GPU active time per entity

2023-04-05 Thread Lucas Stach
Hi Luben, Am Dienstag, dem 04.04.2023 um 00:31 -0400 schrieb Luben Tuikov: > On 2023-03-28 04:54, Lucas Stach wrote: > > Hi Danilo, > > > > Am Dienstag, dem 28.03.2023 um 02:57 +0200 schrieb Danilo Krummrich: > > > Hi all, > > > > > > Commit df622729ddbf ("drm/scheduler: track GPU active time

Re: [Regression] drm/scheduler: track GPU active time per entity

2023-04-05 Thread Danilo Krummrich
On 4/5/23 18:09, Luben Tuikov wrote: On 2023-04-05 10:05, Danilo Krummrich wrote: On 4/4/23 06:31, Luben Tuikov wrote: On 2023-03-28 04:54, Lucas Stach wrote: Hi Danilo, Am Dienstag, dem 28.03.2023 um 02:57 +0200 schrieb Danilo Krummrich: Hi all, Commit df622729ddbf ("drm/scheduler: track

Re: [PATCH 1/8] drm/gma500: Use drm_aperture_remove_conflicting_pci_framebuffers

2023-04-05 Thread Javier Martinez Canillas
Daniel Vetter writes: > On Wed, 5 Apr 2023 at 18:54, Javier Martinez Canillas > wrote: >> >> Daniel Vetter writes: [...] >> >> Yeah, agreed that if vga_remove_vgacon() isn't enough and another helper >> is needed then starts to get a little silly. Maybe one option is to add a >> 3rd param to

Re: [PATCH 3/3] drm/fb-helper: fix input validation gaps in check_var

2023-04-05 Thread Javier Martinez Canillas
Daniel Vetter writes: > On Wed, Apr 05, 2023 at 06:27:17PM +0200, Javier Martinez Canillas wrote: >> Daniel Vetter writes: [...] >> > >> > The __fill_var is after this. I'm honestly not sure what the exact >> >> Ah, your patch adds it after that indeed. Please ignore my comment then. > > So

Re: [PATCH] drm/scheduler: set entity to NULL in drm_sched_entity_pop_job()

2023-04-05 Thread Luben Tuikov
On 2023-03-31 01:59, Christian König wrote: > Am 31.03.23 um 02:06 schrieb Danilo Krummrich: >> It already happend a few times that patches slipped through which >> implemented access to an entity through a job that was already removed >> from the entities queue. Since jobs and entities might have

Re: [RFC PATCH 02/10] drm/sched: Move schedule policy to scheduler / entity

2023-04-05 Thread Luben Tuikov
Hi, Inlined: On 2023-04-03 20:22, Matthew Brost wrote: > Rather than a global modparam for scheduling policy, move the scheduling > policy to scheduler / entity so user can control each scheduler / entity > policy. > > Signed-off-by: Matthew Brost > --- >

Re: [PATCH 3/3] drm/fb-helper: fix input validation gaps in check_var

2023-04-05 Thread Daniel Vetter
On Wed, Apr 05, 2023 at 06:27:17PM +0200, Javier Martinez Canillas wrote: > Daniel Vetter writes: > > [...] > > >> > >> but only the 'var->xres > fb->width || var->yres > fb->height' from the > >> conditions checked could be false after your __fill_var() call above. > >> > >> You should drop

Re: [PATCH 1/8] drm/gma500: Use drm_aperture_remove_conflicting_pci_framebuffers

2023-04-05 Thread Daniel Vetter
On Wed, 5 Apr 2023 at 18:54, Javier Martinez Canillas wrote: > > Daniel Vetter writes: > > > On Wed, Apr 05, 2023 at 04:32:19PM +0200, Thomas Zimmermann wrote: > > [...] > > >> > > >/* > >> > > > * WARNING: Apparently we must kick fbdev drivers before > >> > > > vgacon, > >> > >

[PATCH] drm/nouveau: Add a jump label in nouveau_gem_ioctl_pushbuf()

2023-04-05 Thread Markus Elfring
Date: Wed, 5 Apr 2023 18:38:54 +0200 The label “out_prevalid” was used to jump to another pointer check despite of the detail in the implementation of the function “nouveau_gem_ioctl_pushbuf” that it was determined already in one case that the corresponding variable contained an error pointer

Re: [PATCH RFC 02/18] rust: drm: Add Device and Driver abstractions

2023-04-05 Thread Daniel Vetter
On Tue, Mar 07, 2023 at 11:25:27PM +0900, Asahi Lina wrote: > Add the initial abstractions for DRM drivers and devices. These go > together in one commit since they are fairly tightly coupled types. > > A few things have been stubbed out, to be implemented as further bits of > the DRM subsystem

Re: [PATCH v10 2/2] drm: add kms driver for loongson display controller

2023-04-05 Thread Sui Jingfeng
On 2023/4/6 00:40, Sui Jingfeng wrote: Hi, On 2023/4/4 22:10, Emil Velikov wrote: Greetings Sui Jingfeng, I haven't been around drm-land for a while and this is the first driver I skim through in a few years. So take the following suggestions with a healthy pinch of salt. Hope that helps

Re: [PATCH 1/8] drm/gma500: Use drm_aperture_remove_conflicting_pci_framebuffers

2023-04-05 Thread Javier Martinez Canillas
Daniel Vetter writes: > On Wed, Apr 05, 2023 at 04:32:19PM +0200, Thomas Zimmermann wrote: [...] >> > > >/* >> > > > * WARNING: Apparently we must kick fbdev drivers before vgacon, >> > > > * otherwise the vga fbdev driver falls over. >> > > > */ >> > > >

Re: [PATCH 01/19] drm/i915/i915_scatterlist: Fix kerneldoc formatting issue - missing '@'

2023-04-05 Thread Lee Jones
On Wed, 05 Apr 2023, Jani Nikula wrote: > On Wed, 05 Apr 2023, Lee Jones wrote: > > On Tue, 04 Apr 2023, Jani Nikula wrote: > > > >> On Mon, 03 Apr 2023, Lee Jones wrote: > >> > On Mon, 03 Apr 2023, Jani Nikula wrote: > >> > > >> >> On Fri, 31 Mar 2023, Lee Jones wrote: > >> >> > Fixes the

Re: [PATCH v10 2/2] drm: add kms driver for loongson display controller

2023-04-05 Thread Sui Jingfeng
Hi, On 2023/4/4 22:10, Emil Velikov wrote: Greetings Sui Jingfeng, I haven't been around drm-land for a while and this is the first driver I skim through in a few years. So take the following suggestions with a healthy pinch of salt. Hope that helps o/ Emil, we love your reviews, On Mon, 3

[PATCH] drm/scheduler: Fix UAF race in drm_sched_entity_push_job()

2023-04-05 Thread Asahi Lina
After a job is pushed into the queue, it is owned by the scheduler core and may be freed at any time, so we can't write nor read the submit timestamp after that point. Fixes oopses observed with the drm/asahi driver, found with kASAN. Signed-off-by: Asahi Lina ---

[PATCH] drm/scheduler: Fix UAF in drm_sched_fence_get_timeline_name

2023-04-05 Thread Asahi Lina
A signaled scheduler fence can outlive its scheduler, since fences are independently reference counted. Therefore, we can't reference the scheduler in the get_timeline_name() implementation. Fixes oopses on `cat /sys/kernel/debug/dma_buf/bufinfo` when shared dma-bufs reference fences from GPU

Re: [PATCH 3/3] drm/fb-helper: fix input validation gaps in check_var

2023-04-05 Thread Javier Martinez Canillas
Daniel Vetter writes: [...] >> >> but only the 'var->xres > fb->width || var->yres > fb->height' from the >> conditions checked could be false after your __fill_var() call above. >> >> You should drop the 'var->bits_per_pixel > bpp', 'var->xres_virtual > >> fb->width' and 'var->yres_virtual >

Re: [Regression] drm/scheduler: track GPU active time per entity

2023-04-05 Thread Luben Tuikov
On 2023-04-05 10:05, Danilo Krummrich wrote: > On 4/4/23 06:31, Luben Tuikov wrote: >> On 2023-03-28 04:54, Lucas Stach wrote: >>> Hi Danilo, >>> >>> Am Dienstag, dem 28.03.2023 um 02:57 +0200 schrieb Danilo Krummrich: Hi all, Commit df622729ddbf ("drm/scheduler: track GPU active

Re: [PATCH v3 54/65] clk: da8xx: clk48: Switch to determine_rate

2023-04-05 Thread David Lechner
On 4/5/23 10:22 AM, Maxime Ripard wrote: Hi David, On Wed, Apr 05, 2023 at 10:03:24AM -0500, David Lechner wrote: On 4/4/23 5:11 AM, Maxime Ripard wrote: The TI DA8xx USB0 clk48 clocks implements a mux with a set_parent hook, but doesn't provide a determine_rate implementation. This is a bit

Re: [PATCH 01/18] fbdev: Prepare generic architecture helpers

2023-04-05 Thread Daniel Vetter
On Wed, Apr 05, 2023 at 05:53:03PM +0200, Arnd Bergmann wrote: > On Wed, Apr 5, 2023, at 17:05, Thomas Zimmermann wrote: > > Generic implementations of fb_pgprotect() and fb_is_primary_device() > > have been in the source code for a long time. Prepare the header file > > to make use of them. > > >

Re: [PATCH 01/19] drm/i915/i915_scatterlist: Fix kerneldoc formatting issue - missing '@'

2023-04-05 Thread Jani Nikula
On Wed, 05 Apr 2023, Lee Jones wrote: > On Tue, 04 Apr 2023, Jani Nikula wrote: > >> On Mon, 03 Apr 2023, Lee Jones wrote: >> > On Mon, 03 Apr 2023, Jani Nikula wrote: >> > >> >> On Fri, 31 Mar 2023, Lee Jones wrote: >> >> > Fixes the following W=1 kernel build warning(s): >> >> > >> >> >

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

2023-04-05 Thread Jordan Crouse
On Fri, Mar 10, 2023 at 01:05:36AM +0200, Dmitry Baryshkov wrote: > CAUTION: This email originated from outside of the organization. Do not click > links or open attachments unless you can confirm the sender and know the > content is safe. > > > > On 10/03/2023 00:20, Jordan Crouse wrote: > >

Re: [PATCH 1/8] drm/gma500: Use drm_aperture_remove_conflicting_pci_framebuffers

2023-04-05 Thread Daniel Vetter
On Wed, Apr 05, 2023 at 04:32:19PM +0200, Thomas Zimmermann wrote: > Hi > > Am 05.04.23 um 15:18 schrieb Daniel Vetter: > > On Wed, Apr 05, 2023 at 01:16:27PM +0200, Javier Martinez Canillas wrote: > > > Thomas Zimmermann writes: > > > > > > [...] > > > > > > > > > > > Your comment says that

Re: [PATCH 01/18] fbdev: Prepare generic architecture helpers

2023-04-05 Thread Arnd Bergmann
On Wed, Apr 5, 2023, at 17:05, Thomas Zimmermann wrote: > Generic implementations of fb_pgprotect() and fb_is_primary_device() > have been in the source code for a long time. Prepare the header file > to make use of them. > > Improve the code by using an inline function for fb_pgprotect() and > by

Re: [PATCH RFC 12/18] rust: drm: sched: Add GPU scheduler abstraction

2023-04-05 Thread Daniel Vetter
On Tue, Mar 07, 2023 at 11:25:37PM +0900, Asahi Lina wrote: > The GPU scheduler manages scheduling GPU jobs and dependencies between > them. This Rust abstraction allows Rust DRM drivers to use this > functionality. > > Signed-off-by: Asahi Lina Overall (with my limited rust knowledge) I really

Re: [Regression] drm/scheduler: track GPU active time per entity

2023-04-05 Thread Danilo Krummrich
On 4/4/23 06:31, Luben Tuikov wrote: On 2023-03-28 04:54, Lucas Stach wrote: Hi Danilo, Am Dienstag, dem 28.03.2023 um 02:57 +0200 schrieb Danilo Krummrich: Hi all, Commit df622729ddbf ("drm/scheduler: track GPU active time per entity") tries to track the accumulated time that a job was

Re: [PATCH 1/1] drm/bridge: ti-sn65dsi86: Allow GPIO operations to sleep

2023-04-05 Thread Doug Anderson
Hi, On Wed, Apr 5, 2023 at 6:51 AM Alexander Stein wrote: > > There is no need to require non-sleeping GPIO access. Silence the > WARN_ON() if GPIO is using e.g. I2C expanders. > > Signed-off-by: Alexander Stein > --- > This is the TI SN65DSI86 equivalent to 805245071240 ("drm/bridge: >

Re: [PATCH v3 43/65] ASoC: tlv320aic32x4: Add a determine_rate hook

2023-04-05 Thread Mark Brown
On Wed, Apr 05, 2023 at 05:17:21PM +0200, Maxime Ripard wrote: > On Tue, Apr 04, 2023 at 04:26:18PM +0100, Mark Brown wrote: > > To be honest it's surprising that we'd have to manually specify this, I > > would expect to be able to reparent. I suspect it'd be better to go the > > other way here

Re: [PATCH v2 56/65] clk: ingenic: cgu: Switch to determine_rate

2023-04-05 Thread Paul Cercueil
Le mercredi 05 avril 2023 à 16:50 +0200, Maxime Ripard a écrit : > On Wed, Apr 05, 2023 at 02:57:26PM +0200, Paul Cercueil wrote: > > Le lundi 27 mars 2023 à 21:24 +0200, Maxime Ripard a écrit : > > > On Fri, Mar 24, 2023 at 08:58:48PM +, Aidan MacDonald wrote: > > > > > > My suggestion: add a

Re: [PATCH] drm/panel-edp: Add AUO NE135FBM-N41 v8.1 panel entry

2023-04-05 Thread Doug Anderson
Hi, On Wed, Apr 5, 2023 at 3:05 AM AngeloGioacchino Del Regno wrote: > > Add a panel entry with delay_200_500_e50 for the AUO NE135FBM-N41 > version 8.1, found on a number of ACER laptops, including the > Swift 3 (SF313-52, SF313-53), Chromebook Spin 513 (CP513-2H) and > others. > >

Re: [PATCH v3 54/65] clk: da8xx: clk48: Switch to determine_rate

2023-04-05 Thread David Lechner
On 4/4/23 5:11 AM, Maxime Ripard wrote: The TI DA8xx USB0 clk48 clocks implements a mux with a set_parent hook, but doesn't provide a determine_rate implementation. This is a bit odd, since set_parent() is there to, as its name implies, change the parent of a clock. However, the most likely

Re: [PATCH v3 21/65] clk: davinci: da8xx-cfgchip: Add a determine_rate hook

2023-04-05 Thread David Lechner
On 4/4/23 5:11 AM, Maxime Ripard wrote: The Davinci DA8xxx cfgchip mux clock implements a mux with a set_parent hook, but doesn't provide a determine_rate implementation. This is a bit odd, since set_parent() is there to, as its name implies, change the parent of a clock. However, the most

Re: [PATCH v3 22/65] clk: davinci: da8xx-cfgchip: Add a determine_rate hook

2023-04-05 Thread David Lechner
On 4/4/23 5:11 AM, Maxime Ripard wrote: The Davinci DA8xxx cfgchip "clk48" clock implements a mux with a set_parent hook, but doesn't provide a determine_rate implementation. This is a bit odd, since set_parent() is there to, as its name implies, change the parent of a clock. However, the most

Re: [PATCH 0/4] log2: make is_power_of_2() more generic

2023-04-05 Thread Steven Price
On 31/03/2023 09:31, Jani Nikula wrote: > On Thu, 30 Mar 2023, Andrew Morton wrote: >> On Thu, 30 Mar 2023 21:53:03 + David Laight >> wrote: >> But wouldn't all these issues be addressed by simply doing #define is_power_of_2(n) (n != 0 && ((n & (n - 1)) == 0)) ?

Re: [PATCH v3 54/65] clk: da8xx: clk48: Switch to determine_rate

2023-04-05 Thread Maxime Ripard
Hi David, On Wed, Apr 05, 2023 at 10:03:24AM -0500, David Lechner wrote: > On 4/4/23 5:11 AM, Maxime Ripard wrote: > > The TI DA8xx USB0 clk48 clocks implements a mux with a set_parent > > hook, but doesn't provide a determine_rate implementation. > > > > This is a bit odd, since set_parent() is

Re: [PATCH v3 56/65] clk: ingenic: cgu: Switch to determine_rate

2023-04-05 Thread Maxime Ripard
Hi Paul, On Wed, Apr 05, 2023 at 03:04:05PM +0200, Paul Cercueil wrote: > Le mardi 04 avril 2023 à 12:11 +0200, Maxime Ripard a écrit : > > The Ingenic CGU clocks implements a mux with a set_parent hook, but > > doesn't provide a determine_rate implementation. > > > > This is a bit odd, since

Re: [PATCH v3 43/65] ASoC: tlv320aic32x4: Add a determine_rate hook

2023-04-05 Thread Maxime Ripard
Hi Mark, On Tue, Apr 04, 2023 at 04:26:18PM +0100, Mark Brown wrote: > On Tue, Apr 04, 2023 at 12:11:33PM +0200, Maxime Ripard wrote: > > The tlv320aic32x4 clkin clock implements a mux with a set_parent hook, > > but doesn't provide a determine_rate implementation. > > > This is a bit odd, since

Re: [PATCH v3 64/65] ASoC: tlv320aic32x4: div: Switch to determine_rate

2023-04-05 Thread Mark Brown
On Tue, Apr 04, 2023 at 12:11:54PM +0200, Maxime Ripard wrote: > The driver does implement round_rate() though, which means that we can > change the rate of the clock, but we will never get to change the > parent. > However, It's hard to tell whether it's been done on purpose or not. > Since

Re: [PATCH v3 63/65] ASoC: tlv320aic32x4: pll: Switch to determine_rate

2023-04-05 Thread Mark Brown
On Tue, Apr 04, 2023 at 12:11:53PM +0200, Maxime Ripard wrote: > The driver does implement round_rate() though, which means that we can > change the rate of the clock, but we will never get to change the > parent. > However, It's hard to tell whether it's been done on purpose or not. > Since

Re: [PATCH 0/7] drm/tegra: Convert fbdev to DRM client

2023-04-05 Thread Thomas Zimmermann
Am 05.04.23 um 16:55 schrieb Thierry Reding: On Thu, Mar 30, 2023 at 10:36:00AM +0200, Thomas Zimmermann wrote: Convert tegra's fbdev code to struct drm_client. Replaces the current ad-hoc integration. The conversion includes a number of cleanups. As with most other drivers' fbdev emulation,

[PATCH 16/18] arch/sparc: Implement fb_is_primary_device() in source file

2023-04-05 Thread Thomas Zimmermann
Other architectures implment fb_is_primary_device() in a source file. Do the same on sparc. No functional changes, but allows to remove several include statement from . Signed-off-by: Thomas Zimmermann Cc: "David S. Miller" --- arch/sparc/Makefile | 1 + arch/sparc/include/asm/fb.h |

[PATCH 14/18] arch/powerpc: Implement with generic helpers

2023-04-05 Thread Thomas Zimmermann
Replace the architecture's fb_is_primary_device() with the generic one from . No functional changes. Signed-off-by: Thomas Zimmermann Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy --- arch/powerpc/include/asm/fb.h | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-)

[PATCH 12/18] arch/parisc: Implement fb_is_primary_device() under arch/parisc

2023-04-05 Thread Thomas Zimmermann
Move PARISC's implementation of fb_is_primary_device() into the architecture directory. This the place of the declaration and where other architectures implement this function. No functional changes. Signed-off-by: Thomas Zimmermann Cc: "James E.J. Bottomley" Cc: Helge Deller ---

[PATCH 04/18] arch/arm64: Implement with generic helpers

2023-04-05 Thread Thomas Zimmermann
Replace the architecture's fb_is_primary_device() with the generic one from . No functional changes. Signed-off-by: Thomas Zimmermann Cc: Catalin Marinas Cc: Will Deacon --- arch/arm64/include/asm/fb.h | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git

[PATCH 15/18] arch/sh: Implement with generic helpers

2023-04-05 Thread Thomas Zimmermann
Replace the architecture's fb_is_primary_device() with the generic one from . No functional changes. Signed-off-by: Thomas Zimmermann Cc: Yoshinori Sato Cc: Rich Felker Cc: John Paul Adrian Glaubitz --- arch/sh/include/asm/fb.h | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-)

[PATCH 18/18] arch/x86: Implement with generic helpers

2023-04-05 Thread Thomas Zimmermann
Include and set the required preprocessor tokens correctly. x86 now implements its own set of fb helpers, but still follows the overall pattern. Signed-off-by: Thomas Zimmermann Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Dave Hansen Cc: "H. Peter Anvin" ---

[PATCH 06/18] arch/loongarch: Implement with generic helpers

2023-04-05 Thread Thomas Zimmermann
Replace the architecture's fb_is_primary_device() with the generic one from . No functional changes. Signed-off-by: Thomas Zimmermann Cc: Huacai Chen Cc: WANG Xuerui --- arch/loongarch/include/asm/fb.h | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git

[PATCH 07/18] arch/m68k: Implement with generic helpers

2023-04-05 Thread Thomas Zimmermann
Replace the architecture's fb_is_primary_device() with the generic one from . No functional changes. Also use the generic helper for fb_pgprotect() on systems without MMU. Signed-off-by: Thomas Zimmermann Cc: Geert Uytterhoeven --- arch/m68k/include/asm/fb.h | 10 +++--- 1 file changed, 3

  1   2   3   >