RE: [PATCH v2 2/2] vfio: Replace the iommu notifier with a device list

2022-06-07 Thread Tian, Kevin
> From: Jason Gunthorpe > Sent: Wednesday, June 8, 2022 7:02 AM > > Instead of bouncing the function call to the driver op through a blocking > notifier just have the iommu layer call it directly. > > Register each device that is being attached to the iommu with the lower > driver which then

RE: [PATCH v2 1/2] vfio: Replace the DMA unmapping notifier with a callback

2022-06-07 Thread Tian, Kevin
> From: Jason Gunthorpe > Sent: Wednesday, June 8, 2022 7:02 AM > > Instead of having drivers register the notifier with explicit code just > have them provide a dma_unmap callback op in their driver ops and rely on > the core code to wire it up. > > Suggested-by: Christoph Hellwig >

[PATCH] drm/panel-edp: Add LQ140M1JW48 edp panel entry

2022-06-07 Thread Bjorn Andersson
Add panel identification entry for the Sharp LQ140M1JW48 eDP panel. Due to lacking documentation, a delay similar to those for the LQ140M1JW46 numbers are picked for now. Signed-off-by: Bjorn Andersson --- drivers/gpu/drm/panel/panel-edp.c | 1 + 1 file changed, 1 insertion(+) diff --git

[RFC 3/3] drm/amd/display: Introduce KUnit tests to the bw_fixed library

2022-06-07 Thread Maíra Canal
From: Magali Lemes The bw_fixed library performs a lot of the mathematical operations involving fixed-point arithmetic and the conversion of integers to fixed-point representation. As fixed-point representation is the base foundation of the DML calcs operations, this unit tests intend to assure

[RFC 2/3] drm/amd/display: Move bw_fixed macros to header file

2022-06-07 Thread Maíra Canal
The macros defined at bw_fixed are important mathematical definitions, specifying masks to get the fractional part and the maximum and minimum values of I64. In order to enable unit tests for bw_fixed, it is relevant to have access to those macros. This commit moves the macros to the header file,

[RFC 1/3] drm/amd/display: Introduce KUnit to DML

2022-06-07 Thread Maíra Canal
KUnit unifies the test structure and provides helper tools that simplify the development. Basic use case allows running tests as regular processes, which makes easier to run unit tests on a development machine and to integrate the tests in a CI system. This commit introduce a basic unit test to

[RFC 0/3] drm/amd/display: Introduce KUnit to Display Mode Library

2022-06-07 Thread Maíra Canal
This RFC is a preview of the work being developed by Isabella Basso [1], Maíra Canal [2], and Tales Lelo [3], as part of their Google Summer of Code projects [4], and Magali Lemes [5], as part of her capstone project. Our main goal is to bring unit testing to the AMDPGU driver; in particular,

[PATCH] drm/i915: More PVC+DG2 workarounds

2022-06-07 Thread Matt Roper
A new PVC+DG2 workaround has appeared recently: - Wa_16015675438 And a couple existing DG2 workarounds have been extended to PVC: - Wa_14015795083 - Wa_18018781329 Note that Wa_16015675438 asks us to program a register that is in the 0x2xxx range typically associated with the RCS engine, even

linux-next: manual merge of the drm-intel tree with Linus' tree

2022-06-07 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the drm-intel tree got a conflict in: drivers/gpu/drm/i915/gt/intel_rps.c between commit: 56758cc45955 ("drm/i915/rps: Centralize computation of freq caps") from Linus' tree and commit: ee421bb4cb95 ("drm/i915/pcode: Extend pcode functions for

linux-next: manual merge of the drm-intel tree with Linus' tree

2022-06-07 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the drm-intel tree got a conflict in: drivers/gpu/drm/i915/display/intel_dmc_regs.h between commit: 2518f226c60d ("Merge tag 'drm-next-2022-05-25' of git://anongit.freedesktop.org/drm/drm") from Linus' tree and commit: 21c47196aec3 ("drm/i915/dmc:

Re: [PATCH] drm/i915/guc/slpc: Use non-blocking H2G for waitboost

2022-06-07 Thread John Harrison
On 6/7/2022 15:29, Dixit, Ashutosh wrote: On Sat, 14 May 2022 23:05:06 -0700, Vinay Belgaumkar wrote: SLPC min/max frequency updates require H2G calls. We are seeing timeouts when GuC channel is backed up and it is unable to respond in a timely fashion causing warnings and affecting CI. This

[PATCH 2/2] video: fbdev: skeletonfb: Convert to generic power management

2022-06-07 Thread Bjorn Helgaas
From: Bjorn Helgaas PCI-specific power management (pci_driver.suspend and pci_driver.resume) is deprecated. If drivers implement power management, they should use the generic power management framework, not the PCI-specific hooks. Convert the sample code to use the generic power management

[PATCH 1/2] video: fbdev: cirrusfb: Remove useless reference to PCI power management

2022-06-07 Thread Bjorn Helgaas
From: Bjorn Helgaas PCI-specific power management (pci_driver.suspend and pci_driver.resume) is deprecated. The cirrusfb driver has never implemented power management at all, but if it ever does, it should use the generic power management framework, not the PCI-specific hooks. Remove the

[PATCH 0/2] video: fbdev: Convert from PCI to generic power management

2022-06-07 Thread Bjorn Helgaas
From: Bjorn Helgaas PCI-specific power management (pci_driver.suspend and pci_driver.resume) is deprecated. If drivers implement power management, they should use the generic power management framework, not the PCI-specific hooks. No fbdev drivers actually implement PCI power management, but

Re: [Intel-gfx] [PATCH] drm/i915/guc/slpc: Use non-blocking H2G for waitboost

2022-06-07 Thread John Harrison
On 6/7/2022 16:02, John Harrison wrote: On 5/16/2022 00:59, Jani Nikula wrote: On Sat, 14 May 2022, Vinay Belgaumkar wrote: SLPC min/max frequency updates require H2G calls. We are seeing timeouts when GuC channel is backed up and it is unable to respond in a timely fashion causing warnings

Re: [Intel-gfx] [PATCH] drm/i915/guc/slpc: Use non-blocking H2G for waitboost

2022-06-07 Thread John Harrison
On 5/16/2022 00:59, Jani Nikula wrote: On Sat, 14 May 2022, Vinay Belgaumkar wrote: SLPC min/max frequency updates require H2G calls. We are seeing timeouts when GuC channel is backed up and it is unable to respond in a timely fashion causing warnings and affecting CI. This is seen when

[PATCH v2 1/2] vfio: Replace the DMA unmapping notifier with a callback

2022-06-07 Thread Jason Gunthorpe
Instead of having drivers register the notifier with explicit code just have them provide a dma_unmap callback op in their driver ops and rely on the core code to wire it up. Suggested-by: Christoph Hellwig Reviewed-by: Christoph Hellwig Signed-off-by: Jason Gunthorpe ---

[PATCH v2 0/2] Remove the VFIO_IOMMU_NOTIFY_DMA_UNMAP notifier

2022-06-07 Thread Jason Gunthorpe
This is the last notifier toward the drivers, replace it with a simple op callback in the vfio_device_ops. v2: - Declare and initialize variables in intel_vgpu_dma_unmap() - Remove 'vendor' when touching comments - Remove kdoc for vfio dma_unmap notifier - Add WARN_ON to

[PATCH v2 2/2] vfio: Replace the iommu notifier with a device list

2022-06-07 Thread Jason Gunthorpe
Instead of bouncing the function call to the driver op through a blocking notifier just have the iommu layer call it directly. Register each device that is being attached to the iommu with the lower driver which then threads them on a linked list and calls the appropriate driver op at the right

Re: [Intel-gfx] [PATCH 32/33] drm/i915/guc: Implement GuC priority management

2022-06-07 Thread John Harrison
On 6/7/2022 06:58, Tvrtko Ursulin wrote: A blast from the past.. On 27/07/2021 01:23, Matthew Brost wrote: Implement a simple static mapping algorithm of the i915 priority levels (int, -1k to 1k exposed to user) to the 4 GuC levels. Mapping is as follows: i915 level < 0  -> GuC low

Re: [PATCH 1/2] vfio: Replace the DMA unmapping notifier with a callback

2022-06-07 Thread Jason Gunthorpe
On Tue, Jun 07, 2022 at 08:57:52AM -0300, Jason Gunthorpe wrote: > On Tue, Jun 07, 2022 at 07:39:55AM +0200, Christoph Hellwig wrote: > > > > +static int vfio_iommu_notifier(struct notifier_block *nb, unsigned long > > > action, > > > +void *data) > > > +{ > > > + struct

Re: [PATCH] drm/i915/guc/slpc: Use non-blocking H2G for waitboost

2022-06-07 Thread Dixit, Ashutosh
On Sat, 14 May 2022 23:05:06 -0700, Vinay Belgaumkar wrote: > > SLPC min/max frequency updates require H2G calls. We are seeing > timeouts when GuC channel is backed up and it is unable to respond > in a timely fashion causing warnings and affecting CI. > > This is seen when waitboosting happens

Re: [PATCH] drm/i915/guc: Use drm_err instead of pr_err

2022-06-07 Thread Dixit, Ashutosh
On Tue, 07 Jun 2022 15:23:17 -0700, John Harrison wrote: > > On 6/7/2022 15:07, Dixit, Ashutosh wrote: > > On Tue, 07 Jun 2022 14:51:03 -0700, john.c.harri...@intel.com wrote: > >> From: John Harrison > >> > >> Don't use pr_err in places where we have access to a struct_drm. > > Seem to be many

Re: [PATCH] drm/i915/guc: Use drm_err instead of pr_err

2022-06-07 Thread John Harrison
On 6/7/2022 15:07, Dixit, Ashutosh wrote: On Tue, 07 Jun 2022 14:51:03 -0700, john.c.harri...@intel.com wrote: From: John Harrison Don't use pr_err in places where we have access to a struct_drm. Seem to be many more pr_err's in selftests. Is there a reason why drm_err's cannot be used in

Re: [PATCH] drm/i915/guc: Use drm_err instead of pr_err

2022-06-07 Thread Dixit, Ashutosh
On Tue, 07 Jun 2022 14:51:03 -0700, john.c.harri...@intel.com wrote: > > From: John Harrison > > Don't use pr_err in places where we have access to a struct_drm. Seem to be many more pr_err's in selftests. Is there a reason why drm_err's cannot be used in selftests (especially those using an

[PATCH] drm/i915/guc: Use drm_err instead of pr_err

2022-06-07 Thread John . C . Harrison
From: John Harrison Don't use pr_err in places where we have access to a struct_drm. Signed-off-by: John Harrison --- drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c | 10 ++--- drivers/gpu/drm/i915/gt/uc/selftest_guc.c | 38 +-- .../drm/i915/gt/uc/selftest_guc_multi_lrc.c

[PATCH 1/4] backlight: aat2870: Use backlight helper

2022-06-07 Thread Stephen Kitt
Instead of retrieving the backlight brightness in struct backlight_properties manually, and then checking whether the backlight should be on at all, use backlight_get_brightness() which does all this and insulates this from future changes. Signed-off-by: Stephen Kitt Cc: Lee Jones Cc: Daniel

Re: [Intel-gfx] [RFC v3 1/3] drm/doc/rfc: VM_BIND feature design document

2022-06-07 Thread Niranjana Vishwanathapura
On Tue, Jun 07, 2022 at 11:18:11AM -0700, Niranjana Vishwanathapura wrote: On Tue, Jun 07, 2022 at 12:12:03PM -0500, Jason Ekstrand wrote: On Fri, Jun 3, 2022 at 6:52 PM Niranjana Vishwanathapura wrote: On Fri, Jun 03, 2022 at 10:20:25AM +0300, Lionel Landwerlin wrote: > On

[PATCH RESEND] drm: adv7511: override i2c address of cec before accessing it

2022-06-07 Thread Antonio Borneo
Commit 680532c50bca ("drm: adv7511: Add support for i2c_new_secondary_device") allows a device tree node to override the default addresses of the secondary i2c devices. This is useful for solving address conflicts on the i2c bus. In adv7511_init_cec_regmap() the new i2c address of cec device is

Re: [Freedreno] [PATCH] drm/msm: Switch ordering of runpm put vs devfreq_idle

2022-06-07 Thread Rob Clark
On Tue, Sep 28, 2021 at 7:52 AM Akhil P Oommen wrote: > > On 9/27/2021 8:59 PM, Rob Clark wrote: > > From: Rob Clark > > > > I've seen a few crashes like: > > > > Internal error: synchronous external abort: 9610 [#1] PREEMPT SMP > > Modules linked in: snd_seq_dummy snd_seq

Re: [Intel-gfx] [RFC v3 3/3] drm/doc/rfc: VM_BIND uapi definition

2022-06-07 Thread Niranjana Vishwanathapura
On Tue, Jun 07, 2022 at 11:42:08AM +0100, Tvrtko Ursulin wrote: On 03/06/2022 07:53, Niranjana Vishwanathapura wrote: On Wed, Jun 01, 2022 at 10:08:35PM -0700, Niranjana Vishwanathapura wrote: On Wed, Jun 01, 2022 at 11:27:17AM +0200, Daniel Vetter wrote: On Wed, 1 Jun 2022 at 11:03, Dave

Re: [PATCH] drm/bridge: parade-ps8622: Use backlight helper

2022-06-07 Thread Stephen Kitt
On Tue, 7 Jun 2022 20:10:22 +0200, Stephen Kitt wrote: > backlight_properties.fb_blank is deprecated. The states it represents > are handled by other properties; but instead of accessing those > properties directly, drivers should use the helpers provided by > backlight.h. Apologies for the

Re: [PATCH] drm: shmobile: Use backlight helper

2022-06-07 Thread Stephen Kitt
On Tue, 7 Jun 2022 20:31:32 +0200, Stephen Kitt wrote: > backlight_properties.fb_blank is deprecated. The states it represents > are handled by other properties; but instead of accessing those > properties directly, drivers should use the helpers provided by > backlight.h. Apologies for the

Re: [PATCH 0/2] Improve vfio-pci primary GPU assignment behavior

2022-06-07 Thread Alex Williamson
On Tue, 7 Jun 2022 19:40:40 +0200 Javier Martinez Canillas wrote: > Hello Alex, > > On 6/6/22 19:53, Alex Williamson wrote: > > Users attempting to enable vfio PCI device assignment with a GPU will > > often block the default PCI driver from the device to avoid conflicts > > with the device

Re: [PATCH 1/1] drm/panfrost: Add support for devcoredump

2022-06-07 Thread Adrián Larumbe
On 18.05.2022 13:54, Rob Clark wrote: > On Tue, May 17, 2022 at 10:42 AM Adrián Larumbe > wrote: > > > > In the event of a job timeout, debug dump information will be written into > > /sys/class/devcoredump. > > > > Inspired by etnaviv's similar feature. > > > > Signed-off-by: Adrián Larumbe > >

Re: [RESEND RFC 17/18] drm/radeon: Drop legacy MST support

2022-06-07 Thread Alex Deucher
On Tue, Jun 7, 2022 at 3:39 PM Lyude Paul wrote: > > Right now, radeon is technically the only non-atomic driver still making > use of the MST helpers - and thus the final user of all of the legacy MST > helpers. Originally I was going to look into seeing if we could move legacy > MST into the

[PATCH 5/7] fbdev: nvidia: Use backlight helper

2022-06-07 Thread Stephen Kitt
Instead of retrieving the backlight brightness in struct backlight_properties manually, and then checking whether the backlight should be on at all, use backlight_get_brightness() which does all this and insulates this from future changes. Signed-off-by: Stephen Kitt Cc: Antonino Daplas Cc:

[PATCH 1/7] fbdev: aty128fb: Use backlight helper

2022-06-07 Thread Stephen Kitt
Instead of retrieving the backlight brightness in struct backlight_properties manually, and then checking whether the backlight should be on at all, use backlight_get_brightness() which does all this and insulates this from future changes. Signed-off-by: Stephen Kitt Cc: Paul Mackerras Cc:

Re: [PATCH] staging: ftbft: Use backlight helper

2022-06-07 Thread Andy Shevchenko
On Tue, Jun 07, 2022 at 08:55:16PM +0200, Stephen Kitt wrote: > backlight_properties.fb_blank is deprecated. The states it represents > are handled by other properties; but instead of accessing those > properties directly, drivers should use the helpers provided by > backlight.h. > > Instead of

Re: [Intel-gfx] [RFC v3 3/3] drm/doc/rfc: VM_BIND uapi definition

2022-06-07 Thread Niranjana Vishwanathapura
On Tue, Jun 07, 2022 at 11:27:14AM +0100, Tvrtko Ursulin wrote: On 17/05/2022 19:32, Niranjana Vishwanathapura wrote: VM_BIND and related uapi definitions v2: Ensure proper kernel-doc formatting with cross references. Also add new uapi and documentation as per review comments from

Re: [PATCH v1 06/13] drm/probe-helper: make .get_modes() optional, add default action

2022-06-07 Thread Ville Syrjälä
On Tue, Jun 07, 2022 at 02:14:54PM +0300, Jani Nikula wrote: > On Thu, 02 Jun 2022, Ville Syrjälä wrote: > > On Tue, May 24, 2022 at 01:39:28PM +0300, Jani Nikula wrote: > >> Add default action when .get_modes() not set. This also defines what a > >> .get_modes() hook should do. > >> > >> Cc:

[PATCH 0/4] video/backlight: Use backlight helpers

2022-06-07 Thread Stephen Kitt
This started with work on the removal of backlight_properties' deprecated fb_blank field, much of which can be taken care of by using helper functions provided by backlight.h instead of directly accessing fields in backlight_properties. This patch series doesn't involve fb_blank, but it still

Re: [PATCH V2 0/3] DSI host and peripheral initialisation ordering

2022-06-07 Thread Jagan Teki
Hi Marek, On Wed, May 18, 2022 at 7:35 PM Marek Szyprowski wrote: > > Hi Dave, > > On 11.05.2022 17:47, Dave Stevenson wrote: > > On Wed, 11 May 2022 at 15:58, Marek Szyprowski > > wrote: > >> On 05.04.2022 13:43, Dave Stevenson wrote: > >>> On Fri, 18 Mar 2022 at 12:25, Dave Stevenson > >>>

[RESEND RFC 18/18] drm/display/dp_mst: Move all payload info into the atomic state

2022-06-07 Thread Lyude Paul
Now that we've finally gotten rid of the non-atomic MST users leftover in the kernel, we can finally get rid of all of the legacy payload code we have and move as much as possible into the MST atomic state structs. The main purpose of this is to make the MST code a lot less confusing to work on,

[RESEND RFC 02/18] drm/amdgpu/dm/mst: Rename get_payload_table()

2022-06-07 Thread Lyude Paul
This function isn't too confusing if you see the comment around the call-site for it, but if you don't then it's not at all obvious this is meant to copy DRM's payload table over to DC's internal state structs. Seeing this function before finding that comment definitely threw me into a loop a few

[RESEND RFC 13/18] drm/display/dp_mst: Add helpers for serializing SST <-> MST transitions

2022-06-07 Thread Lyude Paul
There's another kind of situation where we could potentially race with nonblocking modesets and MST, especially if we were to only use the locking provided by atomic modesetting: * Display 1 begins as enabled on DP-1 in SST mode * Display 1 switches to MST mode, exposes one sink in MST mode *

[RESEND RFC 17/18] drm/radeon: Drop legacy MST support

2022-06-07 Thread Lyude Paul
Right now, radeon is technically the only non-atomic driver still making use of the MST helpers - and thus the final user of all of the legacy MST helpers. Originally I was going to look into seeing if we could move legacy MST into the radeon driver itself, however: * SI and CIK both can use

[RESEND RFC 16/18] drm/display/dp_mst: Maintain time slot allocations when deleting payloads

2022-06-07 Thread Lyude Paul
Currently, we set drm_dp_atomic_payload->time_slots to 0 in order to indicate that we're about to delete a payload in the current atomic state. Since we're going to be dropping all of the legacy code for handling the payload table however, we need to be able to ensure that we still keep track of

[RESEND RFC 15/18] drm/display/dp_mst: Skip releasing payloads if last connected port isn't connected

2022-06-07 Thread Lyude Paul
In the past, we've ran into strange issues regarding errors in response to trying to destroy payloads after a port has been unplugged. We fixed this back in: This is intended to replace the workaround that was added here: commit 3769e4c0af5b ("drm/dp_mst: Avoid to mess up payload table by ports

[RESEND RFC 14/18] drm/display/dp_mst: Drop all ports from topology on CSNs before queueing link address work

2022-06-07 Thread Lyude Paul
We want to start cutting down on all of the places that we use port validation, so that ports may be removed from the topology as quickly as possible to minimize the number of errors we run into as a result of being out of sync with the current topology status. This isn't a very typical scenario

[RESEND RFC 09/18] drm/display/dp_mst: Don't open code modeset checks for releasing time slots

2022-06-07 Thread Lyude Paul
I'm not sure why, but at the time I originally wrote the find/release time slot helpers I thought we should avoid keeping modeset tracking out of the MST helpers. In retrospect though there's no actual good reason to do this, and the logic has ended up being identical across all the drivers using

[PATCH 2/3] drm/panel: panel-dsi-cm: Use backlight helpers

2022-06-07 Thread Stephen Kitt
Instead of retrieving the backlight brightness in struct backlight_properties manually, and then checking whether the backlight should be on at all, use backlight_get_brightness() which does all this and insulates this from future changes. Instead of setting the power state by manually updating

[RESEND RFC 08/18] drm/display/dp_mst: Add nonblocking helpers for DP MST

2022-06-07 Thread Lyude Paul
As Daniel Vetter pointed out, if we only use the atomic modesetting locks with MST it's technically possible for a driver with non-blocking modesets to race when it comes to MST displays - as we make the mistake of not doing our own CRTC commit tracking in the topology_state object. This could

[RESEND RFC 12/18] drm/nouveau/kms: Pull mst state in for all modesets

2022-06-07 Thread Lyude Paul
Since we're going to be relying on atomic locking for payloads now (and the MST mgr needs to track CRTCs), pull in the topology state for all modesets in nv50_msto_atomic_check(). Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/dispnv50/disp.c | 2 +- 1 file changed, 1 insertion(+), 1

[RESEND RFC 10/18] drm/display/dp_mst: Fix modeset tracking in drm_dp_atomic_release_vcpi_slots()

2022-06-07 Thread Lyude Paul
Currently with the MST helpers we avoid releasing payloads _and_ avoid pulling in the MST state if there aren't any actual payload changes. While we want to keep the first step, we need to now make sure that we're always pulling in the MST state on all modesets that can modify payloads - even if

[RESEND RFC 11/18] drm/nouveau/kms: Cache DP encoders in nouveau_connector

2022-06-07 Thread Lyude Paul
Post-NV50, the only kind of encoder you'll find for DP connectors on Nvidia GPUs are SORs (serial output resources). Because SORs have fixed associations with their connectors, we can correctly assume that any DP connector on a nvidia GPU will have exactly one SOR encoder routed to it for

[RESEND RFC 04/18] drm/display/dp_mst: Call them time slots, not VCPI slots

2022-06-07 Thread Lyude Paul
VCPI is only sort of the correct term here, originally the majority of this code simply referred to timeslots vaguely as "slots" - and since I started working on it and adding atomic functionality, the name "VCPI slots" has been used to represent time slots. Now that we actually have consistent

[RESEND RFC 07/18] drm/display/dp_mst: Add helper for finding payloads in atomic MST state

2022-06-07 Thread Lyude Paul
We already open-code this quite often, and will be iterating through payloads even more once we've moved all of the payload tracking into the atomic state. So, let's add a helper for doing this. Signed-off-by: Lyude Paul Cc: Wayne Lin Cc: Ville Syrjälä Cc: Fangzhi Zuo Cc: Jani Nikula Cc:

[RESEND RFC 06/18] drm/display/dp_mst: Add some missing kdocs for atomic MST structs

2022-06-07 Thread Lyude Paul
Since we're about to start adding some stuff here, we may as well fill in any missing documentation that we forgot to write. Signed-off-by: Lyude Paul Cc: Wayne Lin Cc: Ville Syrjälä Cc: Fangzhi Zuo Cc: Jani Nikula Cc: Imre Deak Cc: Daniel Vetter Cc: Sean Paul ---

[RESEND RFC 05/18] drm/display/dp_mst: Fix confusing docs for drm_dp_atomic_release_time_slots()

2022-06-07 Thread Lyude Paul
For some reason we mention returning 0 if "slots have been added back to drm_dp_mst_topology_state->avail_slots". This is totally misleading, avail_slots is simply for figuring out the total number of slots available in total on the topology and has no relation to the current payload allocations.

[RESEND RFC 01/18] drm/amdgpu/dc/mst: Rename dp_mst_stream_allocation(_table)

2022-06-07 Thread Lyude Paul
Just to make this more clear to outside contributors that these are DC-specific structs, as this also threw me into a loop a number of times before I figured out the purpose of this. Signed-off-by: Lyude Paul Cc: Wayne Lin Cc: Fangzhi Zuo ---

[PATCH 3/7] fbdev: radeon: Use backlight helper

2022-06-07 Thread Stephen Kitt
Instead of retrieving the backlight brightness in struct backlight_properties manually, and then checking whether the backlight should be on at all, use backlight_get_brightness() which does all this and insulates this from future changes. Signed-off-by: Stephen Kitt Cc: Benjamin Herrenschmidt

[RESEND RFC 03/18] drm/display/dp_mst: Rename drm_dp_mst_vcpi_allocation

2022-06-07 Thread Lyude Paul
In retrospect, the name I chose for this originally is confusing, as there's a lot more info in here then just the VCPI. This really should be called a payload. Let's make it more obvious that this is meant to be related to the atomic state and is about payloads by renaming it to

[PATCH 4/7] fbdev: mx3fb: Use backlight helper

2022-06-07 Thread Stephen Kitt
Instead of retrieving the backlight brightness in struct backlight_properties manually, and then checking whether the backlight should be on at all, use backlight_get_brightness() which does all this and insulates this from future changes. Signed-off-by: Stephen Kitt Cc: Helge Deller Cc:

[RESEND RFC 00/18] drm/display/dp_mst: Drop Radeon MST support, make MST atomic-only

2022-06-07 Thread Lyude Paul
Ugh, thanks ./scripts/get_maintainers.pl for confusing and breaking git-send email <<. Sorry for the resend everyone. For quite a while we've been carrying around a lot of legacy modesetting code in the MST helpers that has been rather annoying to keep around, and very often gets in the way of

[PATCH 7/7] fbdev: riva: Use backlight helper

2022-06-07 Thread Stephen Kitt
Instead of retrieving the backlight brightness in struct backlight_properties manually, and then checking whether the backlight should be on at all, use backlight_get_brightness() which does all this and insulates this from future changes. Signed-off-by: Stephen Kitt Cc: Antonino Daplas Cc:

[PATCH 6/7] fbdev: omapfb: panel-dsi-cm: Use backlight helper

2022-06-07 Thread Stephen Kitt
Instead of retrieving the backlight brightness in struct backlight_properties manually, and then checking whether the backlight should be on at all, use backlight_get_brightness() which does all this and insulates this from future changes. Signed-off-by: Stephen Kitt Cc: Helge Deller Cc:

[PATCH 2/7] fbdev: atyfb: Use backlight helper

2022-06-07 Thread Stephen Kitt
Instead of retrieving the backlight brightness in struct backlight_properties manually, and then checking whether the backlight should be on at all, use backlight_get_brightness() which does all this and insulates this from future changes. Signed-off-by: Stephen Kitt Cc: Helge Deller Cc:

[PATCH 4/4] backlight: tosa: Use backlight helper

2022-06-07 Thread Stephen Kitt
Instead of retrieving the backlight brightness in struct backlight_properties manually, and then checking whether the backlight should be on at all, use backlight_get_brightness() which does all this and insulates this from future changes. Signed-off-by: Stephen Kitt Cc: Lee Jones Cc: Daniel

[RFC 04/18] drm/display/dp_mst: Call them time slots, not VCPI slots

2022-06-07 Thread Lyude Paul
VCPI is only sort of the correct term here, originally the majority of this code simply referred to timeslots vaguely as "slots" - and since I started working on it and adding atomic functionality, the name "VCPI slots" has been used to represent time slots. Now that we actually have consistent

[RFC 07/18] drm/display/dp_mst: Add helper for finding payloads in atomic MST state

2022-06-07 Thread Lyude Paul
We already open-code this quite often, and will be iterating through payloads even more once we've moved all of the payload tracking into the atomic state. So, let's add a helper for doing this. Signed-off-by: Lyude Paul Cc: Wayne Lin Cc: Ville Syrjälä Cc: Fangzhi Zuo Cc: Jani Nikula Cc:

[RFC 06/18] drm/display/dp_mst: Add some missing kdocs for atomic MST structs

2022-06-07 Thread Lyude Paul
Since we're about to start adding some stuff here, we may as well fill in any missing documentation that we forgot to write. Signed-off-by: Lyude Paul Cc: Wayne Lin Cc: Ville Syrjälä Cc: Fangzhi Zuo Cc: Jani Nikula Cc: Imre Deak Cc: Daniel Vetter Cc: Sean Paul ---

[RFC 05/18] drm/display/dp_mst: Fix confusing docs for drm_dp_atomic_release_time_slots()

2022-06-07 Thread Lyude Paul
For some reason we mention returning 0 if "slots have been added back to drm_dp_mst_topology_state->avail_slots". This is totally misleading, avail_slots is simply for figuring out the total number of slots available in total on the topology and has no relation to the current payload allocations.

Re: [git pull] drm for 5.19-rc1

2022-06-07 Thread Geert Uytterhoeven
Hi Linus, On Tue, Jun 7, 2022 at 8:15 PM Linus Torvalds wrote: > On Tue, Jun 7, 2022 at 3:23 AM Geert Uytterhoeven > wrote: > > These header files are heavy users of large constants lacking the "U" > > suffix e.g.: > > > > #define NB_ADAPTER_ID__SUBSYSTEM_ID_MASK 0xL > > As Andreas

[PATCH 7/7] drm/bridge: anx7625: Add typec_mux_set callback function

2022-06-07 Thread Prashant Malani
From: Pin-Yen Lin Add the callback function when the driver receives state changes of the Type-C port. The callback function configures the crosspoint switch of the anx7625 bridge chip, which can change the output pins of the signals according to the port state. Signed-off-by: Pin-Yen Lin

[RFC 01/18] drm/amdgpu/dc/mst: Rename dp_mst_stream_allocation(_table)

2022-06-07 Thread Lyude Paul
Just to make this more clear to outside contributors that these are DC-specific structs, as this also threw me into a loop a number of times before I figured out the purpose of this. Signed-off-by: Lyude Paul Cc: Wayne Lin Cc: Fangzhi Zuo ---

[RFC 03/18] drm/display/dp_mst: Rename drm_dp_mst_vcpi_allocation

2022-06-07 Thread Lyude Paul
In retrospect, the name I chose for this originally is confusing, as there's a lot more info in here then just the VCPI. This really should be called a payload. Let's make it more obvious that this is meant to be related to the atomic state and is about payloads by renaming it to

[RFC 02/18] drm/amdgpu/dm/mst: Rename get_payload_table()

2022-06-07 Thread Lyude Paul
This function isn't too confusing if you see the comment around the call-site for it, but if you don't then it's not at all obvious this is meant to copy DRM's payload table over to DC's internal state structs. Seeing this function before finding that comment definitely threw me into a loop a few

[PATCH 6/7] drm/bridge: anx7625: Register Type-C mode switches

2022-06-07 Thread Prashant Malani
When the DT node has "switches" available, register a Type-C mode-switch for each listed "switch". This allows the driver to receive state information about what operating mode a Type-C port and its connected peripherals are in, as well as status information (like VDOs) related to that state. The

[PATCH 3/4] backlight: ipaq_micro: Use backlight helper

2022-06-07 Thread Stephen Kitt
Instead of retrieving the backlight brightness in struct backlight_properties manually, and then checking whether the backlight should be on at all, use backlight_get_brightness() which does all this and insulates this from future changes. Signed-off-by: Stephen Kitt Cc: Lee Jones Cc: Daniel

[PATCH 2/4] backlight: arcxcnn: Use backlight helper

2022-06-07 Thread Stephen Kitt
Instead of retrieving the backlight brightness in struct backlight_properties manually, and then checking whether the backlight should be on at all, use backlight_get_brightness() which does all this and insulates this from future changes. Signed-off-by: Stephen Kitt Cc: Lee Jones Cc: Daniel

[PATCH 5/7] drm/bridge: anx7625: Register number of Type C switches

2022-06-07 Thread Prashant Malani
Parse the "switches" node, if available, and count and store the number of Type-C switches within it. Since we currently don't do anything with this info, no functional changes are expected from this change. This patch sets a foundation for the actual registering of Type-C switches with the

[RFC 00/18] drm/display/dp_mst: Drop Radeon MST support, make MST atomic-only

2022-06-07 Thread Lyude Paul
For quite a while we've been carrying around a lot of legacy modesetting code in the MST helpers that has been rather annoying to keep around, and very often gets in the way of trying to implement additional functionality in MST such as fallback link rate retraining, dynamic BPC management and DSC

[PATCH] drm/i915/xehp: Correct steering initialization

2022-06-07 Thread Matt Roper
Another mistake during the conversion to DSS bitmaps: after retrieving the DSS ID intel_sseu_find_first_xehp_dss() we forgot to modulo it down to obtain which ID within the current gslice it is. Fixes: b87d39019651 ("drm/i915/sseu: Disassociate internal subslice mask representation from uapi")

[PATCH] drm: shmobile: Use backlight helper

2022-06-07 Thread Stephen Kitt
backlight_properties.fb_blank is deprecated. The states it represents are handled by other properties; but instead of accessing those properties directly, drivers should use the helpers provided by backlight.h. Instead of retrieving the backlight brightness in struct backlight_properties

[PATCH 4/7] dt-bindings: drm/bridge: anx7625: Add mode-switch support

2022-06-07 Thread Prashant Malani
Analogix 7625 can be used in systems to switch USB Type-C DisplayPort alternate mode lane traffic between 2 Type-C ports. Update the binding to accommodate this usage by introducing a switch property. Signed-off-by: Prashant Malani --- .../display/bridge/analogix,anx7625.yaml | 56

[PATCH 3/7] dt-bindings: usb: Add Type-C switch binding

2022-06-07 Thread Prashant Malani
Introduce a binding which represents a component that can control the routing of USB Type-C data lines as well as address data line orientation (based on CC lines' orientation). Signed-off-by: Prashant Malani --- .../devicetree/bindings/usb/typec-switch.yaml | 76 +++ 1 file

[PATCH 2/7] usb: typec: mux: Add CONFIG guards for functions

2022-06-07 Thread Prashant Malani
There are some drivers that can use the Type C mux API, but don't have to. Introduce CONFIG guards for the mux functions so that drivers can include the header file and not run into compilation errors on systems which don't have CONFIG_TYPEC enabled. When CONFIG_TYPEC is not enabled, the Type C

[PATCH 1/7] usb: typec: mux: Allow muxes to specify mode-switch

2022-06-07 Thread Prashant Malani
Loosen the typec_mux_match() requirements so that searches where an alt mode is not specified, but the target mux device lists the "mode-switch" property, return a success. This is helpful in Type C port drivers which would like to get a pointer to the mux switch associated with a Type C port,

[PATCH] staging: ftbft: Use backlight helper

2022-06-07 Thread Stephen Kitt
backlight_properties.fb_blank is deprecated. The states it represents are handled by other properties; but instead of accessing those properties directly, drivers should use the helpers provided by backlight.h. Instead of manually checking the power state in struct backlight_properties, use

[PATCH 0/7] usb: typec: Introduce typec-switch binding

2022-06-07 Thread Prashant Malani
This series introduces a binding for Type-C data lane switches. These control the routing and operating modes of USB Type-C data lanes based on the PD messaging from the Type-C port driver regarding connected peripherals. The first patch introduces a change to the Type-C mux class mode-switch

[PATCH v1 7/7] drm/msm/hdmi: merge platform config for 8974/8084/8994/8996

2022-06-07 Thread Dmitry Baryshkov
Since there is no more difference between the HDMI platform data between MSM8974/APQ8084/MSM8994/MSM8996, merge these configs into a single entry. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/hdmi/hdmi.c | 27 +++ 1 file changed, 3 insertions(+), 24

[PATCH v1 6/7] drm/msm/hdmi: drop hpd_regs usage on 8x74/8084

2022-06-07 Thread Dmitry Baryshkov
The MSM HDMI driver has support for hpd_regs on 8x74/8084: supply regulators that are to be enabled for HPD to work. Currently these regulators contain the hpd_gdsc, which was replaced by the power-domains support and hpd-5v/hpd-5v-en, which are not used by the chip itself. They power up the ESD

[PATCH 5.18 276/879] drm: bridge: icn6211: Fix HFP_HSW_HBP_HI and HFP_MIN handling

2022-06-07 Thread Greg Kroah-Hartman
From: Marek Vasut [ Upstream commit c0ff7a649d62105a9308cc3ac36e52a4669d9cb4 ] The HFP_HSW_HBP_HI register must be programmed with 2 LSbits of each Horizontal Front Porch/Sync/Back Porch. Currently the driver programs this register to 0, which breaks displays with either value above 255. The

[PATCH v1 5/7] drm/msm/hdmi: drop empty 'none' regulator lists

2022-06-07 Thread Dmitry Baryshkov
Several platform configs use empty 'none' regulator arrays. They are not necessary, as the code will use corresponding _cnt field and skip the array completely. Drop them now. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/hdmi/hdmi.c | 5 - 1 file changed, 5 deletions(-) diff

[PATCH 3/3] drm/panel: sony-acx565akm: Use backlight helpers

2022-06-07 Thread Stephen Kitt
Instead of retrieving the backlight brightness in struct backlight_properties manually, and then checking whether the backlight should be on at all, use backlight_get_brightness() which does all this and insulates this from future changes. Instead of manually checking the power state in struct

[PATCH v1 4/7] drm/msm/hdmi: enable core-vcc/core-vdda-supply for 8996 platform

2022-06-07 Thread Dmitry Baryshkov
DB820c makes use of core-vcc-supply and core-vdda-supply, however the driver code doesn't support these regulators. Enable them for HDMI on 8996 platform. Fixes: 0afbe59edd3f ("drm/msm/hdmi: Add basic HDMI support for msm8996") Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/hdmi/hdmi.c

[PATCH 0/3] drm/panel: Use backlight helpers

2022-06-07 Thread Stephen Kitt
backlight_properties.fb_blank is deprecated. The states it represents are handled by other properties; but instead of accessing those properties directly, drivers should use the helpers provided by backlight.h. This will ultimately allow fb_blank to be removed. Stephen Kitt (3): drm/panel: Use

[PATCH v1 3/7] drm/msm/hdmi: drop unused GPIO support

2022-06-07 Thread Dmitry Baryshkov
The HDMI driver has code to configure extra GPIOs, which predates pinctrl support. Nowadays all platforms should use pinctrl instead. Neither of upstreamed Qualcomm pltforms uses these properties, so it's safe to drop them. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/hdmi/hdmi.c

[PATCH 5.18 275/879] drm: bridge: icn6211: Fix register layout

2022-06-07 Thread Greg Kroah-Hartman
From: Marek Vasut [ Upstream commit 2dcec57b3734029cc1adc5cb872f61e21609eed4 ] The chip register layout has nothing to do with MIPI DCS, the registers incorrectly marked as MIPI DCS in the driver are regular chip registers often with completely different function. Fill in the actual register

  1   2   3   >