Re: [Intel-gfx] [PATCH v10 5/7] drm/i915: Fill in native_420 field

2023-02-20 Thread Kandpal, Suraj
> > > -Original Message- > > From: Intel-gfx On Behalf Of > > Suraj Kandpal > > Sent: Wednesday, February 15, 2023 8:47 AM > > To: intel-gfx@lists.freedesktop.org > > Subject: [Intel-gfx] [PATCH v10 5/7] drm/i915: Fill in native_420 > > field > > Append "display" > drm/i915/display ?

Re: [Intel-gfx] [PATCH v9 6/7] drm/i915/vdsc: Check slice design requirement

2023-02-20 Thread Kandpal, Suraj
> > > > +static int intel_dsc_slice_dimensions_valid(struct intel_crtc_state > *pipe_config, > > + struct drm_dsc_config *vdsc_cfg) { > > + if (pipe_config->output_format == INTEL_OUTPUT_FORMAT_RGB || > > + pipe_config->output_format == > INTEL_OUTPUT_F

[Intel-gfx] ✗ Fi.CI.BUILD: failure for Add vfio_device cdev for iommufd support (rev3)

2023-02-20 Thread Patchwork
== Series Details == Series: Add vfio_device cdev for iommufd support (rev3) URL : https://patchwork.freedesktop.org/series/113696/ State : failure == Summary == Error: patch https://patchwork.freedesktop.org/api/1.0/series/113696/revisions/3/mbox/ not applied Applying: vfio: Allocate per de

[Intel-gfx] [PATCH v4 16/19] vfio: Add VFIO_DEVICE_BIND_IOMMUFD

2023-02-20 Thread Yi Liu
This adds ioctl for userspace to bind device cdev fd to iommufd. VFIO_DEVICE_BIND_IOMMUFD: bind device to an iommufd, hence gain DMA control provided by the iommufd. open_device op is called after bind_iommufd op.

[Intel-gfx] [PATCH v4 18/19] vfio: Compile group optionally

2023-02-20 Thread Yi Liu
group code is not needed for vfio device cdev, so with vfio device cdev introduced, the group infrastructures can be compiled out if only cdev is needed. Signed-off-by: Yi Liu --- drivers/vfio/Kconfig | 14 drivers/vfio/Makefile | 2 +- drivers/vfio/vfio.h | 78 +

[Intel-gfx] [PATCH v4 15/19] vfio: Add cdev for vfio_device

2023-02-20 Thread Yi Liu
This allows user to directly open a vfio device w/o using the legacy container/group interface, as a prerequisite for supporting new iommu features like nested translation. The device fd opened in this manner doesn't have the capability to access the device as the fops open() doesn't open the devi

[Intel-gfx] [PATCH v4 14/19] vfio: Make vfio_device_open() single open for device cdev path

2023-02-20 Thread Yi Liu
VFIO group has historically allowed multi-open of the device FD. This was made secure because the "open" was executed via an ioctl to the group FD which is itself only single open. However, no known use of multiple device FDs today. It is kind of a strange thing to do because new device FDs can na

[Intel-gfx] [PATCH v4 13/19] vfio: Add cdev_device_open_cnt to vfio_group

2023-02-20 Thread Yi Liu
for counting the devices that are opened via the cdev path. This count is increased and decreased by the cdev path. The group path checks it to achieve exclusion with the cdev path. With this, only one path (group path or cdev path) will claim DMA ownership. This avoids scenarios in which devices w

[Intel-gfx] [PATCH v4 07/19] vfio: Block device access via device fd until device is opened

2023-02-20 Thread Yi Liu
Allow the vfio_device file to be in a state where the device FD is opened but the device cannot be used by userspace (i.e. its .open_device() hasn't been called). This inbetween state is not used when the device FD is spawned from the group FD, however when we create the device FD directly by openi

[Intel-gfx] [PATCH v4 19/19] docs: vfio: Add vfio device cdev description

2023-02-20 Thread Yi Liu
This gives hints for userspace applications on device cdev usage. Signed-off-by: Yi Liu --- Documentation/driver-api/vfio.rst | 125 ++ 1 file changed, 125 insertions(+) diff --git a/Documentation/driver-api/vfio.rst b/Documentation/driver-api/vfio.rst index 4452742

[Intel-gfx] [PATCH v4 03/19] vfio: Accept vfio device file in the driver facing kAPI

2023-02-20 Thread Yi Liu
This makes the vfio file kAPIs to accepte vfio device files, also a preparation for vfio device cdev support. For the kvm set with vfio device file, kvm pointer is stored in struct vfio_device_file, and use kvm_ref_lock to protect kvm set and kvm pointer usage within VFIO. This kvm pointer will be

[Intel-gfx] [PATCH v4 17/19] vfio: Add VFIO_DEVICE_AT[DE]TACH_IOMMUFD_PT

2023-02-20 Thread Yi Liu
This adds ioctl for userspace to attach device cdev fd to and detach from IOAS/hw_pagetable managed by iommufd. VFIO_DEVICE_ATTACH_IOMMUFD_PT: attach vfio device to IOAS, hw_pagetable managed by iommufd. Attach can be undo b

[Intel-gfx] [PATCH v4 09/19] vfio/pci: Accept device fd for hot reset

2023-02-20 Thread Yi Liu
This prepares for using vfio device cdev as no group fd will be opened in device cdev usage. vfio_file_is_device_opened() is added for checking a given vfio file is able to be a proof for the device ownership or not. The reason is that the cdev path has the device opened in an in-between state, in

[Intel-gfx] [PATCH v4 11/19] vfio-iommufd: Add detach_ioas support for physical VFIO devices

2023-02-20 Thread Yi Liu
this prepares for adding DETACH ioctl for physical VFIO devices. Signed-off-by: Yi Liu Reviewed-by: Kevin Tian --- Documentation/driver-api/vfio.rst | 8 +--- drivers/vfio/fsl-mc/vfio_fsl_mc.c | 1 + drivers/vfio/iommufd.c| 20 ++

[Intel-gfx] [PATCH v4 12/19] vfio-iommufd: Add detach_ioas for emulated VFIO devices

2023-02-20 Thread Yi Liu
this prepares for adding DETACH ioctl for emulated VFIO devices. Signed-off-by: Yi Liu Reviewed-by: Kevin Tian --- drivers/gpu/drm/i915/gvt/kvmgt.c | 1 + drivers/s390/cio/vfio_ccw_ops.c | 1 + drivers/s390/crypto/vfio_ap_ops.c | 1 + drivers/vfio/iommufd.c| 18 +++

[Intel-gfx] [PATCH v4 08/19] vfio/pci: Update comment around group_fd get in vfio_pci_ioctl_pci_hot_reset()

2023-02-20 Thread Yi Liu
this suits more on what the code does. Signed-off-by: Yi Liu --- drivers/vfio/pci/vfio_pci_core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/vfio/pci/vfio_pci_core.c b/drivers/vfio/pci/vfio_pci_core.c index 4704c1babae3..827524510f3f 100644 --- a/drivers/vfio/p

[Intel-gfx] [PATCH v4 06/19] vfio: Pass struct vfio_device_file * to vfio_device_open/close()

2023-02-20 Thread Yi Liu
This avoids passing too much parameters in multiple functions. Signed-off-by: Yi Liu Reviewed-by: Kevin Tian --- drivers/vfio/group.c | 19 +-- drivers/vfio/vfio.h | 8 drivers/vfio/vfio_main.c | 25 +++-- 3 files changed, 32 insertions(+),

[Intel-gfx] [PATCH v4 10/19] vfio: Add infrastructure for bind_iommufd from userspace

2023-02-20 Thread Yi Liu
For the device fd opened from cdev, userspace needs to bind it to an iommufd and attach it to IOAS managed by iommufd. With such operations, userspace can set up a secure DMA context and hence access device. This changes the existing vfio_iommufd_bind() to accept a pt_id pointer as an optional inp

[Intel-gfx] [PATCH v4 04/19] kvm/vfio: Rename kvm_vfio_group to prepare for accepting vfio device fd

2023-02-20 Thread Yi Liu
Meanwhile, rename related helpers. No functional change is intended. Signed-off-by: Yi Liu Reviewed-by: Kevin Tian Reviewed-by: Eric Auger --- virt/kvm/vfio.c | 115 1 file changed, 58 insertions(+), 57 deletions(-) diff --git a/virt/kvm/vfio.c

[Intel-gfx] [PATCH v4 01/19] vfio: Allocate per device file structure

2023-02-20 Thread Yi Liu
This is preparation for adding vfio device cdev support. vfio device cdev requires: 1) a per device file memory to store the kvm pointer set by KVM. It will be propagated to vfio_device:kvm after the device cdev file is bound to an iommufd 2) a mechanism to block device access through device

[Intel-gfx] [PATCH v4 05/19] kvm/vfio: Accept vfio device file from userspace

2023-02-20 Thread Yi Liu
This defines KVM_DEV_VFIO_FILE* and make alias with KVM_DEV_VFIO_GROUP*. Old userspace uses KVM_DEV_VFIO_GROUP* works as well. Signed-off-by: Yi Liu --- Documentation/virt/kvm/devices/vfio.rst | 50 - include/uapi/linux/kvm.h| 16 ++-- virt/kvm/vfio.c

[Intel-gfx] [PATCH v4 02/19] vfio: Refine vfio file kAPIs

2023-02-20 Thread Yi Liu
This prepares for making the below kAPIs to accept both group file and device file instead of only vfio group file. bool vfio_file_enforced_coherent(struct file *file); void vfio_file_set_kvm(struct file *file, struct kvm *kvm); bool vfio_file_has_dev(struct file *file, struct vfio_device *d

[Intel-gfx] [PATCH v4 00/19] Add vfio_device cdev for iommufd support

2023-02-20 Thread Yi Liu
Existing VFIO provides group-centric user APIs for userspace. Userspace opens the /dev/vfio/$group_id first before getting device fd and hence getting access to device. This is not the desired model for iommufd. Per the conclusion of community discussion[1], iommufd provides device-centric kAPIs an

[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915: Init DDI ports in VBT order (rev2)

2023-02-20 Thread Patchwork
== Series Details == Series: drm/i915: Init DDI ports in VBT order (rev2) URL : https://patchwork.freedesktop.org/series/114200/ State : success == Summary == CI Bug Log - changes from CI_DRM_12764_full -> Patchwork_114200v2_full Summary --

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Init DDI ports in VBT order (rev2)

2023-02-20 Thread Patchwork
== Series Details == Series: drm/i915: Init DDI ports in VBT order (rev2) URL : https://patchwork.freedesktop.org/series/114200/ State : success == Summary == CI Bug Log - changes from CI_DRM_12764 -> Patchwork_114200v2 Summary --- *

[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915: Get HDR DPCD refresh timeout from VBT (rev2)

2023-02-20 Thread Patchwork
== Series Details == Series: drm/i915: Get HDR DPCD refresh timeout from VBT (rev2) URL : https://patchwork.freedesktop.org/series/114196/ State : success == Summary == CI Bug Log - changes from CI_DRM_12763_full -> Patchwork_114196v2_full

[Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915: Init DDI ports in VBT order (rev2)

2023-02-20 Thread Patchwork
== Series Details == Series: drm/i915: Init DDI ports in VBT order (rev2) URL : https://patchwork.freedesktop.org/series/114200/ State : warning == Summary == Error: dim sparse failed Sparse version: v0.6.2 Fast mode used, each commit won't be checked separately.

[Intel-gfx] [PATCH v2 18/18] drm/i915: Convert HSW/BDW to use VBT driven DDI probe

2023-02-20 Thread Ville Syrjala
From: Ville Syrjälä Make HSW/BDW use the new VBT child device driven output probing as well. To achieve that the strap checks are moved into intel_ddi_init() itself. I have one HSW ULT laptop here which declares all the ports A-D in the VBT, so in order to avoid assert_port_valid() tripping on D

[Intel-gfx] [PATCH v2 17/18] drm/i915: Try to initialize DDI/ICL+ DSI ports for every VBT child device

2023-02-20 Thread Ville Syrjala
From: Ville Syrjälä Try to deal with duplicate child devices for the same DDI port by attempting to initialize them in VBT defined order The first on to succeed for a specific DDI port will be the one we use. TODO: DSI dual link handling is sketchy at best Signed-off-by: Ville Syrjälä --- dri

[Intel-gfx] [PATCH v2 16/18] drm/i915: Init DDI outputs based on port_mask on skl+

2023-02-20 Thread Ville Syrjala
From: Ville Syrjälä Instead of listing every platform's possible DDI outputs in intel_setup_outputs() just loop over the new port_mask to achieve the same thing. HSW/BDW were left as is since they still look at the straps as well. DSI is still a mess. For now just check for the relevant platfor

[Intel-gfx] [PATCH v2 15/18] drm/i915: Beef up SDVO/HDMI port checks

2023-02-20 Thread Ville Syrjala
From: Ville Syrjälä The SDVO code already warns when the port in question doesn't actually support SDVO. Let's make that also bail the encoder registration like the generic assert_port_valid() we added. And add a similar thing for g4x HDMI, mainly because on g4x itsefl port D only supports DP bu

[Intel-gfx] [PATCH v2 13/18] drm/i915: Assert that device info bitmasks have enough bits

2023-02-20 Thread Ville Syrjala
From: Ville Syrjälä Sprinkle in some BUILD_BUG_ON()s to make sure some of the bitmasks used in the device info have enough bits. Do we have a better place for this sort of stuff? Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/intel_device_info.c | 4 1 file changed, 4 insertions(+

[Intel-gfx] [PATCH v2 14/18] drm/i915: Assert that the port being initialized is valid

2023-02-20 Thread Ville Syrjala
From: Ville Syrjälä Sprinkle some asserts to catch any mishaps in the port_mask vs. output init. For DDI/DP/HDMI/SDVO I decided that we want to bail out for an invalid port since those are the encoder types where we might want consider driving the whole thing from the VBT child device list, and

[Intel-gfx] [PATCH v2 12/18] drm/i915: Introduce device info port_mask

2023-02-20 Thread Ville Syrjala
From: Ville Syrjälä Declare the available DVO/SDVO/HDMI/DP/DDI ports in the device info. The other outputs (LVDS/TV/DSI/VGA) are left out since for most of them we don't consider them as "ports". DSI we should probably perhaps include somehow in the device info. Just not sure how. Or we just int

[Intel-gfx] [PATCH v2 11/18] drm/i915: Remove bogus DDI-F from hsw/bdw output init

2023-02-20 Thread Ville Syrjala
From: Ville Syrjälä HSW/BDW don't have DDI-F so don't go looking for one. Seems to have been accidentally left behind when the skl+ stuff got split out in commit 097d9e902068 ("drm/i915/display: remove strap checks from gen 9"). Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/display/in

[Intel-gfx] [PATCH v2 10/18] drm/i915: Nuke intel_bios_is_port_dp_dual_mode()

2023-02-20 Thread Ville Syrjala
From: Ville Syrjälä Now that we have encoder->devdata everwhere we don't need the intel_bios_is_port_dp_dual_mode() wrapper any more. And while at it let's include it in the child device log dump as well since the logic in there is a bit more complex than just DP&&HDMI. Signed-off-by: Ville Syr

[Intel-gfx] [PATCH v2 09/18] drm/i915: Flip VBT DDC pin maps around

2023-02-20 Thread Ville Syrjala
From: Ville Syrjälä Swap the roles of the index vs. value for the VBT DDC pin mapping tables. This is not strictly necessary for DDC pins but it will make this work exactly like the AUX CH mapping tables where the role reversal is necessary (or at least makes things easier). Consistency is good.

[Intel-gfx] [PATCH v2 08/18] drm/i915: Split map_aux_ch() into per-platform arrays

2023-02-20 Thread Ville Syrjala
From: Ville Syrjälä The big switch+if statement mess in map_aux_ch() is illegible. Split up into cleaner per-platform arrays like we already have for the gmbus pins. We use enum aux_ch as the index and the VBT thing as the value. Slightly non-intuitive perhaps but if we did it the other way arou

[Intel-gfx] [PATCH v2 07/18] drm/i915: Sanitize child devices later

2023-02-20 Thread Ville Syrjala
From: Ville Syrjälä Currently we sanitize the child device aux_ch/ddc_pin while parsing the ports from VBT. But that won't work when we have duplicate child devices for the same port. Instead let's sanitize just before initializing the encoder, based on which resources were consumed by encoders

[Intel-gfx] [PATCH v2 05/18] drm/i915: Introduce intel_hpd_detection()

2023-02-20 Thread Ville Syrjala
From: Ville Syrjälä Add a mechanism by which we can toggle the HPD sense for individual encoders. This will be used during eDP probing to figure out if anything is actually connected. The normal intel_hpd_irq_setup() thing doesn't work since we only do that after probing the outputs, and we only

[Intel-gfx] [PATCH v2 06/18] drm/i915: Check HPD live state during eDP probe

2023-02-20 Thread Ville Syrjala
From: Ville Syrjälä We need to untangle the mess where some SKL machines (at least) declare both DDI A and DDI E to be present in their VBT, and both using AUX A. DDI A is a ghost eDP, wheres DDI E may be a real DP->VGA converter. Currently that is handled by checking the VBT child devices for c

[Intel-gfx] [PATCH v2 04/18] drm/i915: Introduce _hotplug_mask()

2023-02-20 Thread Ville Syrjala
From: Ville Syrjälä Pair each _hotplug_enables() function with a corresponding _hotplug_mask() function so that we can determine right bits to clear on a per hpd_pin basis. We'll need this for turning on HPD sense for a specific encoder rather than just all of them. Signed-off-by: Ville Syrjälä

[Intel-gfx] [PATCH v2 03/18] drm/i915: Get rid of the gm45 HPD live state nonsense

2023-02-20 Thread Ville Syrjala
From: Ville Syrjälä The idea that ctg uses different HPD live state bits is total nonsense, at least on my machine (Dell Latitude E5400). The only reason DP-B even works on my ctg is that DP-D live state is stuck high, even though there is no physical DP-D port. So when the detect checks DP-B li

[Intel-gfx] [PATCH v2 02/18] drm/i915: Fix SKL DDI A digital port .connected()

2023-02-20 Thread Ville Syrjala
From: Ville Syrjälä SKL doesn't have any north DE hotplug stuff. Currently we're trying to read DDI A live state from the BDW north DE bit, instead of the approproate south DE bit. Fix it. And for good measure clear the pointer to the north hpd pin array, so that we'll actually notice if some ot

[Intel-gfx] [PATCH v2 01/18] drm/i915: Populate dig_port->connected() before connector init

2023-02-20 Thread Ville Syrjala
From: Ville Syrjälä We'll need dig_port->connected() to be there for a HPD live state check during eDP connector probing. Reorder intel_ddi_init() accordingly. g4x_dp_init() is already fine. Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/display/intel_ddi.c | 40

[Intel-gfx] [PATCH v2 00/18] drm/i915: Init DDI ports in VBT order

2023-02-20 Thread Ville Syrjala
From: Ville Syrjälä I just wanted to init DDI ports in VBT child device order without any up front assumptions about which conflicting child device defition is valid. That is pretty much what we need to do for the ADL laptops with the phantom eDP vs. native HDMI on DDI B. However that approach

Re: [Intel-gfx] [v11] drm/i915/dsc: Add debugfs entry to validate DSC output formats

2023-02-20 Thread Shankar, Uma
> -Original Message- > From: Intel-gfx On Behalf Of Swati > Sharma > Sent: Tuesday, February 14, 2023 4:33 PM > To: intel-gfx@lists.freedesktop.org > Cc: Nikula, Jani > Subject: [Intel-gfx] [v11] drm/i915/dsc: Add debugfs entry to validate DSC > output > formats > > DSC_Output_Format

Re: [Intel-gfx] [PATCH v9 6/7] drm/i915/vdsc: Check slice design requirement

2023-02-20 Thread Shankar, Uma
> -Original Message- > From: Intel-gfx On Behalf Of Suraj > Kandpal > Sent: Tuesday, February 7, 2023 1:14 PM > To: intel-gfx@lists.freedesktop.org > Subject: [Intel-gfx] [PATCH v9 6/7] drm/i915/vdsc: Check slice design > requirement > > Add function to check if slice design requireme

Re: [Intel-gfx] [PATCH v10 5/7] drm/i915: Fill in native_420 field

2023-02-20 Thread Shankar, Uma
> -Original Message- > From: Intel-gfx On Behalf Of Suraj > Kandpal > Sent: Wednesday, February 15, 2023 8:47 AM > To: intel-gfx@lists.freedesktop.org > Subject: [Intel-gfx] [PATCH v10 5/7] drm/i915: Fill in native_420 field Append "display" > > Now that we have laid the groundwork f

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Get HDR DPCD refresh timeout from VBT (rev2)

2023-02-20 Thread Patchwork
== Series Details == Series: drm/i915: Get HDR DPCD refresh timeout from VBT (rev2) URL : https://patchwork.freedesktop.org/series/114196/ State : success == Summary == CI Bug Log - changes from CI_DRM_12763 -> Patchwork_114196v2 Summary --

Re: [Intel-gfx] [PATCH 11/12] drm/i915: Sprinkle some FIXMEs about TGL+ DSI transcoder timing mess

2023-02-20 Thread Ville Syrjälä
On Tue, Feb 14, 2023 at 12:52:57AM +0200, Ville Syrjala wrote: > From: Ville Syrjälä > > The DSI code has some local hacks to program TRANS_H/VBLANK on > TGL+ (ICL DSI transcoders didn't have these registers). That > will not work when we need to start using the delayed vblank > (for DSB purposes

[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: Init DDI ports in VBT order

2023-02-20 Thread Patchwork
== Series Details == Series: drm/i915: Init DDI ports in VBT order URL : https://patchwork.freedesktop.org/series/114200/ State : failure == Summary == CI Bug Log - changes from CI_DRM_12763 -> Patchwork_114200v1 Summary --- **FAILUR

Re: [Intel-gfx] [PATCH v9 1/7] drm/dp_helper: Add helper to check if the sink supports given format with DSC

2023-02-20 Thread Shankar, Uma
> -Original Message- > From: Shankar, Uma > Sent: Tuesday, February 21, 2023 2:08 AM > To: Suraj Kandpal ; intel-gfx@lists.freedesktop.org > Subject: RE: [Intel-gfx] [PATCH v9 1/7] drm/dp_helper: Add helper to check if > the sink > supports given format with DSC > > > > > -Origin

Re: [Intel-gfx] [PATCH i-g-t] tests/gem_barrier_race: Extend support over compute engines

2023-02-20 Thread Kamil Konieczny
On 2023-02-20 at 14:24:45 +0100, Janusz Krzysztofik wrote: > This test can work not only on render engines, as its current code > suggests, but also on compute class engines. Add them to the set of > engine classes supported by the test, in case a future platform has only > those and no RCS availa

Re: [Intel-gfx] [PATCH v9 2/7] drm/i915/dp: Check if DSC supports the given output_format

2023-02-20 Thread Shankar, Uma
> -Original Message- > From: Intel-gfx On Behalf Of Suraj > Kandpal > Sent: Tuesday, February 7, 2023 1:14 PM > To: intel-gfx@lists.freedesktop.org > Subject: [Intel-gfx] [PATCH v9 2/7] drm/i915/dp: Check if DSC supports the > given > output_format > > From: Ankit Nautiyal > > Go wi

[Intel-gfx] ✓ Fi.CI.IGT: success for series starting with [1/2] drm/i915: Fix audio ELD handling for DP MST

2023-02-20 Thread Patchwork
== Series Details == Series: series starting with [1/2] drm/i915: Fix audio ELD handling for DP MST URL : https://patchwork.freedesktop.org/series/114194/ State : success == Summary == CI Bug Log - changes from CI_DRM_12762_full -> Patchwork_114194v1_full ==

Re: [Intel-gfx] [PATCH v9 1/7] drm/dp_helper: Add helper to check if the sink supports given format with DSC

2023-02-20 Thread Shankar, Uma
> -Original Message- > From: Intel-gfx On Behalf Of Suraj > Kandpal > Sent: Tuesday, February 7, 2023 1:14 PM > To: intel-gfx@lists.freedesktop.org > Subject: [Intel-gfx] [PATCH v9 1/7] drm/dp_helper: Add helper to check if the > sink > supports given format with DSC > > From: Ankit N

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Init DDI ports in VBT order

2023-02-20 Thread Patchwork
== Series Details == Series: drm/i915: Init DDI ports in VBT order URL : https://patchwork.freedesktop.org/series/114200/ State : warning == Summary == Error: dim checkpatch failed 782a06c663af drm/i915: Populate dig_port->connected() before connector init -:59: WARNING:BLOCK_COMMENT_STYLE: Bl

[Intel-gfx] [PATCH v5 14/14] drm/i915: Add deadline based boost support

2023-02-20 Thread Rob Clark
From: Rob Clark v2: rebase Signed-off-by: Rob Clark --- drivers/gpu/drm/i915/i915_request.c | 20 1 file changed, 20 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_request.c b/drivers/gpu/drm/i915/i915_request.c index 7503dcb9043b..44491e7e214c 100644 --- a/drivers

[Intel-gfx] [PATCH v5 00/14] dma-fence: Deadline awareness

2023-02-20 Thread Rob Clark
From: Rob Clark This series adds a deadline hint to fences, so realtime deadlines such as vblank can be communicated to the fence signaller for power/ frequency management decisions. This is partially inspired by a trick i915 does, but implemented via dma-fence for a couple of reasons: 1) To co

Re: [Intel-gfx] [PATCH v9 01/14] drm/i915/display: Add new member to configure PCON color conversion

2023-02-20 Thread Ville Syrjälä
On Mon, Feb 20, 2023 at 05:53:48PM +0530, Ankit Nautiyal wrote: > The decision to use DFP output format conversion capabilities should be > during compute_config phase. > > This patch adds new member to crtc_state to represent the final > output_format to the sink. In case of a DFP this can be dif

[Intel-gfx] ✓ Fi.CI.IGT: success for Handle BPC for HDMI2.1 PCON without DSC1.2 sink and other fixes (rev10)

2023-02-20 Thread Patchwork
== Series Details == Series: Handle BPC for HDMI2.1 PCON without DSC1.2 sink and other fixes (rev10) URL : https://patchwork.freedesktop.org/series/107550/ State : success == Summary == CI Bug Log - changes from CI_DRM_12761_full -> Patchwork_107550v10_full

[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/sseu: fix max_subslices array-index-out-of-bounds access

2023-02-20 Thread Patchwork
== Series Details == Series: drm/i915/sseu: fix max_subslices array-index-out-of-bounds access URL : https://patchwork.freedesktop.org/series/114199/ State : failure == Summary == CI Bug Log - changes from CI_DRM_12762 -> Patchwork_114199v1

[Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915/sseu: fix max_subslices array-index-out-of-bounds access

2023-02-20 Thread Patchwork
== Series Details == Series: drm/i915/sseu: fix max_subslices array-index-out-of-bounds access URL : https://patchwork.freedesktop.org/series/114199/ State : warning == Summary == Error: dim sparse failed Sparse version: v0.6.2 Fast mode used, each commit won't be checked separately.

[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: Get HDR DPCD refresh timeout from VBT

2023-02-20 Thread Patchwork
== Series Details == Series: drm/i915: Get HDR DPCD refresh timeout from VBT URL : https://patchwork.freedesktop.org/series/114196/ State : failure == Summary == CI Bug Log - changes from CI_DRM_12762 -> Patchwork_114196v1 Summary ---

Re: [Intel-gfx] [PATCH] drm/i915/display: Communicate display configuration to pcode

2023-02-20 Thread Lisovskiy, Stanislav
On Mon, Feb 20, 2023 at 06:14:58PM +0200, Ville Syrjälä wrote: > On Mon, Feb 20, 2023 at 05:45:45PM +0200, Lisovskiy, Stanislav wrote: > > On Tue, Feb 14, 2023 at 04:04:05PM +0200, Ville Syrjälä wrote: > > > On Tue, Feb 14, 2023 at 12:01:32PM +0200, Stanislav Lisovskiy wrote: > > > > From: Jigar Bh

[Intel-gfx] [PATCH 16/17] drm/i915: Try to initialize DDI/ICL+ DSI ports for every VBT child device

2023-02-20 Thread Ville Syrjala
From: Ville Syrjälä Try to deal with duplicate child devices for the same DDI port by attempting to initialize them in VBT defined order The first on to succeed for a specific DDI port will be the one we use. TODO: DSI dual link handling is sketchy at best Signed-off-by: Ville Syrjälä --- dri

[Intel-gfx] [PATCH 17/17] drm/i915: Convert HSW/BDW to use VBT driven DDI probe

2023-02-20 Thread Ville Syrjala
From: Ville Syrjälä Make HSW/BDW use the new VBT child device driven output probing as well. To achieve that the strap checks are moved into intel_ddi_init() itself. I have one HSW ULT laptop here which declares all the ports A-D in the VBT, so in order to avoid assert_port_valid() tripping on D

[Intel-gfx] [PATCH 15/17] drm/i915: Init DDI outputs based on port_mask on skl+

2023-02-20 Thread Ville Syrjala
From: Ville Syrjälä Instead of listing every platform's possible DDI outputs in intel_setup_outputs() just loop over the new port_mask to achieve the same thing. HSW/BDW were left as is since they still look at the straps as well. DSI is still a mess. For now just check for the relevant platfor

[Intel-gfx] [PATCH 14/17] drm/i915: Beef up SDVO/HDMI port checks

2023-02-20 Thread Ville Syrjala
From: Ville Syrjälä The SDVO code already warns when the port in question doesn't actually support SDVO. Let's make that also bail the encoder registration like the generic assert_port_valid() we added. And add a similar thing for g4x HDMI, mainly because on g4x itsefl port D only supports DP bu

[Intel-gfx] [PATCH 13/17] drm/i915: Assert that the port being initialized is valid

2023-02-20 Thread Ville Syrjala
From: Ville Syrjälä Sprinkle some asserts to catch any mishaps in the port_mask vs. output init. For DDI/DP/HDMI/SDVO I decided that we want to bail out for an invalid port since those are the encoder types where we might want consider driving the whole thing from the VBT child device list, and

[Intel-gfx] [PATCH 12/17] drm/i915: Assert that device info bitmasks have enough bits

2023-02-20 Thread Ville Syrjala
From: Ville Syrjälä Sprinkle in some BUILD_BUG_ON()s to make sure some of the bitmasks used in the device info have enough bits. Do we have a better place for this sort of stuff? Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/intel_device_info.c | 4 1 file changed, 4 insertions(+

[Intel-gfx] [PATCH 11/17] drm/i915: Introduce device info port_mask

2023-02-20 Thread Ville Syrjala
From: Ville Syrjälä Declare the available DVO/SDVO/HDMI/DP/DDI ports in the device info. The other outputs (LVDS/TV/DSI/VGA) are left out since for most of them we don't consider them as "ports". DSI we should probably perhaps include somehow in the device info. Just not sure how. Or we just int

[Intel-gfx] [PATCH 10/17] drm/i915: Remove bogus DDI-F from hsw/bdw output init

2023-02-20 Thread Ville Syrjala
From: Ville Syrjälä HSW/BDW don't have DDI-F so don't go looking for one. Seems to have been accidentally left behind when the skl+ stuff got split out in commit 097d9e902068 ("drm/i915/display: remove strap checks from gen 9"). Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/display/in

[Intel-gfx] [PATCH 08/17] drm/i915: Flip VBT DDC pin maps around

2023-02-20 Thread Ville Syrjala
From: Ville Syrjälä Swap the roles of the index vs. value for the VBT DDC pin mapping tables. This is not strictly necessary for DDC pins but it will make this work exactly like the AUX CH mapping tables where the role reversal is necessary (or at least makes things easier). Consistency is good.

[Intel-gfx] [PATCH 09/17] drm/i915: Nuke intel_bios_is_port_dp_dual_mode()

2023-02-20 Thread Ville Syrjala
From: Ville Syrjälä Now that we have encoder->devdata everwhere we don't need the intel_bios_is_port_dp_dual_mode() wrapper any more. And while at it let's include it in the child device log dump as well since the logic in there is a bit more complex than just DP&&HDMI. Signed-off-by: Ville Syr

[Intel-gfx] [PATCH 07/17] drm/i915: Split map_aux_ch() into per-platform arrays

2023-02-20 Thread Ville Syrjala
From: Ville Syrjälä The big switch+if statement mess in map_aux_ch() is illegible. Split up into cleaner per-platform arrays like we already have for the gmbus pins. We use enum aux_ch as the index and the VBT thing as the value. Slightly non-intuitive perhaps but if we did it the other way arou

[Intel-gfx] [PATCH 06/17] drm/i915: Sanitize child devices later

2023-02-20 Thread Ville Syrjala
From: Ville Syrjälä Currently we sanitize the child device aux_ch/ddc_pin while parsing the ports from VBT. But that won't work when we have duplicate child devices for the same port. Instead let's sanitize just before initializing the encoder, based on which resources were consumed by encoders

[Intel-gfx] [PATCH 05/17] drm/i915: Check HPD live state during eDP probe

2023-02-20 Thread Ville Syrjala
From: Ville Syrjälä We need to untangle the mess where some SKL machines (at least) declare both DDI A and DDI E to be present in their VBT, and both using AUX A. DDI A is a ghost eDP, wheres DDI E may be a real DP->VGA converter. Currently that is handled by checking the VBT child devices for c

[Intel-gfx] [PATCH 04/17] drm/i915: Introduce intel_hpd_detection()

2023-02-20 Thread Ville Syrjala
From: Ville Syrjälä Add a mechanism by which we can toggle the HPD sense for individual encoders. This will be used during eDP probing to figure out if anything is actually connected. The normal intel_hpd_irq_setup() thing doesn't work since we only do that after probing the outputs, and we only

[Intel-gfx] [PATCH 03/17] drm/i915: Introduce _hotplug_mask()

2023-02-20 Thread Ville Syrjala
From: Ville Syrjälä Pair each _hotplug_enables() function with a corresponding _hotplug_mask() function so that we can determine right bits to clear on a per hpd_pin basis. We'll need this for turning on HPD sense for a specific encoder rather than just all of them. Signed-off-by: Ville Syrjälä

[Intel-gfx] [PATCH 02/17] drm/i915: Get rid of the gm45 HPD live state nonsense

2023-02-20 Thread Ville Syrjala
From: Ville Syrjälä The idea that ctg uses different HPD live state bits is total nonsense, at least on my machine (Dell Latitude E5400). The only reason DP-B even works on my ctg is that DP-D live state is stuck high, even though there is no physical DP-D port. So when the detect checks DP-B li

[Intel-gfx] [PATCH 01/17] drm/i915: Populate dig_port->connected() before connector init

2023-02-20 Thread Ville Syrjala
From: Ville Syrjälä We'll need dig_port->connected() to be there for a HPD live state check during eDP connector probing. Reorder intel_ddi_init() accordingly. g4x_dp_init() is already fine. Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/display/intel_ddi.c | 40

[Intel-gfx] [PATCH 00/17] drm/i915: Init DDI ports in VBT order

2023-02-20 Thread Ville Syrjala
From: Ville Syrjälä I just wanted to init DDI ports in VBT child device order without any up front assumptions about which conflicting child device defition is valid. That is pretty much what we need to do for the ADL laptops with the phantom eDP vs. native HDMI on DDI B. However that approach d

[Intel-gfx] [PATCH] drm/i915/sseu: fix max_subslices array-index-out-of-bounds access

2023-02-20 Thread Andrea Righi
It seems that commit bc3c5e0809ae ("drm/i915/sseu: Don't try to store EU mask internally in UAPI format") exposed a potential out-of-bounds access, reported by UBSAN as following on a laptop with a gen 11 i915 card: UBSAN: array-index-out-of-bounds in drivers/gpu/drm/i915/gt/intel_sseu.c:65:27

Re: [Intel-gfx] [RFC v2 0/5] Waitboost drm syncobj waits

2023-02-20 Thread Rob Clark
On Mon, Feb 20, 2023 at 8:51 AM Tvrtko Ursulin wrote: > > > On 20/02/2023 16:44, Tvrtko Ursulin wrote: > > > > On 20/02/2023 15:52, Rob Clark wrote: > >> On Mon, Feb 20, 2023 at 3:33 AM Tvrtko Ursulin > >> wrote: > >>> > >>> > >>> On 17/02/2023 20:45, Rodrigo Vivi wrote: > > > > [snip] > > > >>>

Re: [Intel-gfx] [RFC v2 0/5] Waitboost drm syncobj waits

2023-02-20 Thread Rob Clark
On Mon, Feb 20, 2023 at 8:44 AM Tvrtko Ursulin wrote: > > > On 20/02/2023 15:52, Rob Clark wrote: > > On Mon, Feb 20, 2023 at 3:33 AM Tvrtko Ursulin > > wrote: > >> > >> > >> On 17/02/2023 20:45, Rodrigo Vivi wrote: > > [snip] > > >> Yeah I agree. And as not all media use cases are the same, as a

Re: [Intel-gfx] [RFC v2 0/5] Waitboost drm syncobj waits

2023-02-20 Thread Tvrtko Ursulin
On 20/02/2023 16:44, Tvrtko Ursulin wrote: On 20/02/2023 15:52, Rob Clark wrote: On Mon, Feb 20, 2023 at 3:33 AM Tvrtko Ursulin wrote: On 17/02/2023 20:45, Rodrigo Vivi wrote: [snip] Yeah I agree. And as not all media use cases are the same, as are not all compute contexts someone som

[Intel-gfx] [PATCH] drm/i915: Get HDR DPCD refresh timeout from VBT

2023-02-20 Thread Ville Syrjala
From: Ville Syrjälä Grab the HDR DPCD refresh timeout (time we need to wait after writing the sourc OUI before the HDR DPCD registers are ready) from the VBT. Windows doesn't even seem to have any default value for this, which is perhaps a bit weird since the VBT value is documented as TGL+ and

Re: [Intel-gfx] [RFC v2 0/5] Waitboost drm syncobj waits

2023-02-20 Thread Tvrtko Ursulin
On 20/02/2023 15:52, Rob Clark wrote: On Mon, Feb 20, 2023 at 3:33 AM Tvrtko Ursulin wrote: On 17/02/2023 20:45, Rodrigo Vivi wrote: [snip] Yeah I agree. And as not all media use cases are the same, as are not all compute contexts someone somewhere will need to run a series of workloads

[Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Fix audio ELD handling for DP MST

2023-02-20 Thread Patchwork
== Series Details == Series: series starting with [1/2] drm/i915: Fix audio ELD handling for DP MST URL : https://patchwork.freedesktop.org/series/114194/ State : success == Summary == CI Bug Log - changes from CI_DRM_12762 -> Patchwork_114194v1

Re: [Intel-gfx] [PATCH] drm/i915/display: Communicate display configuration to pcode

2023-02-20 Thread Ville Syrjälä
On Mon, Feb 20, 2023 at 05:45:45PM +0200, Lisovskiy, Stanislav wrote: > On Tue, Feb 14, 2023 at 04:04:05PM +0200, Ville Syrjälä wrote: > > On Tue, Feb 14, 2023 at 12:01:32PM +0200, Stanislav Lisovskiy wrote: > > > From: Jigar Bhatt > > > > > > Display to communicate "display configuration" to Pco

[Intel-gfx] ✗ Fi.CI.SPARSE: warning for series starting with [1/2] drm/i915: Fix audio ELD handling for DP MST

2023-02-20 Thread Patchwork
== Series Details == Series: series starting with [1/2] drm/i915: Fix audio ELD handling for DP MST URL : https://patchwork.freedesktop.org/series/114194/ State : warning == Summary == Error: dim sparse failed Sparse version: v0.6.2 Fast mode used, each commit won't be checked separately. +./a

Re: [Intel-gfx] [RFC v2 0/5] Waitboost drm syncobj waits

2023-02-20 Thread Tvrtko Ursulin
On 20/02/2023 15:45, Rob Clark wrote: On Mon, Feb 20, 2023 at 4:22 AM Tvrtko Ursulin wrote: On 17/02/2023 17:00, Rob Clark wrote: On Fri, Feb 17, 2023 at 8:03 AM Tvrtko Ursulin wrote: [snip] adapted from your patches.. I think the basic idea of deadlines (which includes "I want it NO

Re: [Intel-gfx] [RFC v2 0/5] Waitboost drm syncobj waits

2023-02-20 Thread Rob Clark
On Mon, Feb 20, 2023 at 3:33 AM Tvrtko Ursulin wrote: > > > On 17/02/2023 20:45, Rodrigo Vivi wrote: > > On Fri, Feb 17, 2023 at 09:00:49AM -0800, Rob Clark wrote: > >> On Fri, Feb 17, 2023 at 8:03 AM Tvrtko Ursulin > >> wrote: > >>> > >>> > >>> On 17/02/2023 14:55, Rob Clark wrote: > On Fri

Re: [Intel-gfx] [PATCH v4 14/14] drm/i915: Add deadline based boost support

2023-02-20 Thread Tvrtko Ursulin
On 18/02/2023 21:15, Rob Clark wrote: From: Rob Clark Signed-off-by: Rob Clark --- This should probably be re-written by someone who knows the i915 request/timeline stuff better, to deal with non-immediate deadlines. But as-is I think this should be enough to handle the case where we want s

Re: [Intel-gfx] [PATCH] drm/i915/display: Communicate display configuration to pcode

2023-02-20 Thread Lisovskiy, Stanislav
On Tue, Feb 14, 2023 at 04:04:05PM +0200, Ville Syrjälä wrote: > On Tue, Feb 14, 2023 at 12:01:32PM +0200, Stanislav Lisovskiy wrote: > > From: Jigar Bhatt > > > > Display to communicate "display configuration" to Pcode for more accurate > > power accounting for DG2. Existing sequence is only sen

Re: [Intel-gfx] [RFC v2 0/5] Waitboost drm syncobj waits

2023-02-20 Thread Rob Clark
On Mon, Feb 20, 2023 at 4:22 AM Tvrtko Ursulin wrote: > > > On 17/02/2023 17:00, Rob Clark wrote: > > On Fri, Feb 17, 2023 at 8:03 AM Tvrtko Ursulin > > wrote: > > [snip] > > >>> adapted from your patches.. I think the basic idea of deadlines > >>> (which includes "I want it NOW" ;-)) isn't cont

Re: [Intel-gfx] [PATCH 0/4] drm/displayid: use primary use case to figure out non-desktop

2023-02-20 Thread Dmitry Osipenko
On 2/16/23 23:44, Jani Nikula wrote: > Mostly this is prep work and plumbing for easier use of displayid > structure version and primary use case for parsing the displayid blocks, > but it can be nicely used for figuring out non-desktop too. > > Completely untested. :) > > BR, > Jani. > > Cc: Ia

Re: [Intel-gfx] [RFC 6/9] drm/syncobj: Mark syncobj waits as external waiters

2023-02-20 Thread Rob Clark
On Mon, Feb 20, 2023 at 5:19 AM Tvrtko Ursulin wrote: > > > On 18/02/2023 19:56, Rob Clark wrote: > > On Thu, Feb 16, 2023 at 2:59 AM Tvrtko Ursulin > > wrote: > >> > >> From: Tvrtko Ursulin > >> > >> Use the previously added dma-fence tracking of explicit waiters. > >> > >> Signed-off-by: Tvrtk

  1   2   >