[Intel-gfx] [PATCH 2/2] drm/i915: Swap ret and status returned from skl_pcode_request

2022-04-11 Thread Stanislav Lisovskiy
If ret isn't zero, it is almost for sure ETIMEDOUT, because we use it in wait_for macro which does continuous retries until timeout is reached. If we still ran out of time and retries, we most likely would be interested in getting status, to understand what was the actual error propagated from PCod

[Intel-gfx] [PATCH 2/2] drm/i915: Swap ret and status returned from skl_pcode_request

2022-04-11 Thread Stanislav Lisovskiy
If ret isn't zero, it is almost for sure ETIMEDOUT, because we use it in wait_for macro which does continuous retries until timeout is reached. If we still ran out of time and retries, we most likely would be interested in getting status, to understand what was the actual error propagated from PCod

[Intel-gfx] ✗ Fi.CI.BUILD: failure for tests/drm_buddy: Add drm buddy test cases

2022-04-11 Thread Patchwork
== Series Details == Series: tests/drm_buddy: Add drm buddy test cases URL : https://patchwork.freedesktop.org/series/102470/ State : failure == Summary == Applying: tests/drm_buddy: Add drm buddy test cases error: sha1 information is lacking or useless (tests/meson.build). error: could not bu

Re: [Intel-gfx] [PATCH 2/2] drm/i915: Swap ret and status returned from skl_pcode_request

2022-04-11 Thread Govindapillai, Vinod
Thanks! Reviewed-by: Vinod Govindapillai > -Original Message- > From: Lisovskiy, Stanislav > Sent: 11 April 2022 11:14 > To: intel-gfx@lists.freedesktop.org > Cc: Lisovskiy, Stanislav ; Govindapillai, Vinod > ; Saarinen, Jani > Subject: [PATCH 2/2] drm/i915: Swap ret and status returne

[Intel-gfx] ✗ Fi.CI.BAT: failure for drm: add a check to verify the size alignment (rev3)

2022-04-11 Thread Patchwork
== Series Details == Series: drm: add a check to verify the size alignment (rev3) URL : https://patchwork.freedesktop.org/series/101569/ State : failure == Summary == CI Bug Log - changes from CI_DRM_11481 -> Patchwork_22837 Summary ---

[Intel-gfx] [PATCH] drm/ttm: stop passing NULL fence in ttm_bo_move_sync_cleanup

2022-04-11 Thread Matthew Auld
If we hit the sync case, like when skipping clearing for kernel internal objects, or when falling back to cpu clearing, like in i915, we end up trying to add a NULL fence, but with some recent changes in this area this now just results in NULL deref in dma_resv_add_fence: <1>[5.466383] BUG: ke

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Fix issues in skl_pcode_request (rev2)

2022-04-11 Thread Patchwork
== Series Details == Series: Fix issues in skl_pcode_request (rev2) URL : https://patchwork.freedesktop.org/series/102410/ State : warning == Summary == $ dim checkpatch origin/drm-tip bd8790414748 drm/i915: Fix skl_pcode_try_request function -:25: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrap

Re: [Intel-gfx] [PATCH] tests/drm_buddy: Add drm buddy test cases

2022-04-11 Thread Matthew Auld
On 11/04/2022 08:28, Arunpravin Paneer Selvam wrote: Add a set of drm buddy test cases to validate the drm/drm_buddy.c memory allocator. Signed-off-by: Arunpravin Paneer Selvam --- tests/drm_buddy.c | 14 ++ tests/meson.build | 1 + 2 files changed, 15 insertions(+) create mo

[Intel-gfx] [CI v2 00/12] drm/edid: low level EDID block read refactoring etc.

2022-04-11 Thread Jani Nikula
Submitting [1] again for CI. Just a slight change in patch 3 to address review. BR, Jani. [1] https://patchwork.freedesktop.org/series/102329/ Jani Nikula (12): drm/edid: convert edid_is_zero() to edid_block_is_zero() for blocks drm/edid: have edid_block_check() detect blocks that are all z

[Intel-gfx] [CI v2 01/12] drm/edid: convert edid_is_zero() to edid_block_is_zero() for blocks

2022-04-11 Thread Jani Nikula
As edid_is_zero() is only ever used on EDID blocks, convert it to edid_block_is_zero() with implicit block size. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä --- drivers/gpu/drm/drm_edid.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/dr

[Intel-gfx] [CI v2 02/12] drm/edid: have edid_block_check() detect blocks that are all zero

2022-04-11 Thread Jani Nikula
We have the check function, have it also detect blocks that are all zero instead of leaving that to callers. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä --- drivers/gpu/drm/drm_edid.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/

[Intel-gfx] [CI v2 03/12] drm/edid: refactor EDID block status printing

2022-04-11 Thread Jani Nikula
Split out a function to log EDID block status. The printouts get changed slightly. Unfortunately, not all users will have struct drm_device available, so we convert to pr_* debug logging instead of drm device based logging. v2: Complain more loudly about unknown status codes (Ville) Signed-off-b

[Intel-gfx] [CI v2 04/12] drm/edid: add a helper to log dump an EDID block

2022-04-11 Thread Jani Nikula
Unify debug log dumping. There's duplication in the error paths for EDID block validity checks, but this should be neglible. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä --- drivers/gpu/drm/drm_edid.c | 33 +++-- 1 file changed, 19 insertions(+), 14 deletion

Re: [Intel-gfx] [PATCH v3] drm: add a check to verify the size alignment

2022-04-11 Thread Matthew Auld
On 11/04/2022 08:38, Arunpravin Paneer Selvam wrote: Add a simple check to reject any size not aligned to the min_page_size. when size is not aligned to min_page_size, driver module should handle in their own way either to round_up() the size value to min_page_size or just to enable WARN_ON().

[Intel-gfx] [CI v2 05/12] drm/edid: pass struct edid to connector_bad_edid()

2022-04-11 Thread Jani Nikula
Avoid casting here and there, and make it const. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä --- drivers/gpu/drm/drm_edid.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index 0b8098e34236..e

[Intel-gfx] [CI v2 06/12] drm/edid: add typedef for block read function

2022-04-11 Thread Jani Nikula
Make the callback a bit easier on the eye. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä --- drivers/gpu/drm/drm_edid.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index e1afd6a55a8c..5b45

[Intel-gfx] [CI v2 07/12] drm/edid: abstract an EDID block read helper

2022-04-11 Thread Jani Nikula
We have an abstraction for the EDID base block read, yet duplicating the retries and error handling for extension block reads. Introduce a more generic EDID block read helper. Switch to the helper piecemeal, starting with drm_edid_get_panel_id(), which doesn't need or have access to the connector

[Intel-gfx] [CI v2 08/12] drm/edid: use EDID block read helper in drm_do_get_edid()

2022-04-11 Thread Jani Nikula
Convert drm_do_get_edit() from the base block read helper to the generic block read helper. There's quite a bit going on here, as the corrupt and null EDID information is moved back to the caller. As we see, they were not all that clear to begin with, and this change underlines that. Signed-off-by

[Intel-gfx] [CI v2 09/12] drm/edid: convert extension block read to EDID block read helper

2022-04-11 Thread Jani Nikula
Use the EDID block read helper also for extension block reads, making edid_block_read() the only place with the read retry logic. Note: We observe that drm_do_get_edid() does not use invalid extension blocks to flag the EDID as corrupt. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä ---

[Intel-gfx] [CI v2 10/12] drm/edid: drop extra local var

2022-04-11 Thread Jani Nikula
We don't need override as a variable for anything. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä --- drivers/gpu/drm/drm_edid.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index 8a050b65c06a..5a1906a

[Intel-gfx] [CI v2 11/12] drm/edid: add single point of return to drm_do_get_edid()

2022-04-11 Thread Jani Nikula
This will be useful in the future. Use fail label for fail exit. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä --- drivers/gpu/drm/drm_edid.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index

[Intel-gfx] [CI v2 12/12] drm/edid: add EDID block count and size helpers

2022-04-11 Thread Jani Nikula
Add some helpers to figure out the EDID extension block count, block count, size, pointers to blocks. Unfortunately, we'll need to cast away the const in a few places where we actually need to access the data. v2: fix s/j/i/ introduced in a rebase Signed-off-by: Jani Nikula Reviewed-by: Ville S

Re: [Intel-gfx] [PATCH 06/12] drm/edid: add typedef for block read function

2022-04-11 Thread Jani Nikula
On Thu, 07 Apr 2022, Ville Syrjälä wrote: > On Thu, Apr 07, 2022 at 12:14:32PM +0300, Jani Nikula wrote: >> Make the callback a bit easier on the eye. >> >> Signed-off-by: Jani Nikula >> --- >> drivers/gpu/drm/drm_edid.c | 18 +- >> 1 file changed, 9 insertions(+), 9 deletions(-

Re: [Intel-gfx] [PATCH 03/12] drm/edid: refactor EDID block status printing

2022-04-11 Thread Jani Nikula
On Thu, 07 Apr 2022, Ville Syrjälä wrote: > On Thu, Apr 07, 2022 at 12:14:29PM +0300, Jani Nikula wrote: >> Split out a function to log EDID block status. The printouts get changed >> slightly. >> >> Unfortunately, not all users will have struct drm_device available, so >> we convert to pr_* debu

[Intel-gfx] [V2 0/3] Expose max and current bpc via debugfs

2022-04-11 Thread Bhanuprakash Modem
This series will expose the Connector's max supported bpc via connector debugfs and Crtc's current bpc via crtc debugfs. Also move the existing vendor specific "output_bpc" logic to drm. Test-with: 20220411094147.1650859-2-bhanuprakash.mo...@intel.com Bhanuprakash Modem (3): drm/debug: Expose c

[Intel-gfx] [V2 0/3] Expose max and current bpc via debugfs

2022-04-11 Thread Bhanuprakash Modem
This series will expose the Connector's max supported bpc via connector debugfs and Crtc's current bpc via crtc debugfs. Also move the existing vendor specific "output_bpc" logic to drm. Test-with: 20220411094147.1650859-2-bhanuprakash.mo...@intel.com Bhanuprakash Modem (3): drm/debug: Expose c

Re: [Intel-gfx] [PATCH 00/12] drm/edid: low level EDID block read refactoring etc.

2022-04-11 Thread Jani Nikula
On Thu, 07 Apr 2022, Ville Syrjälä wrote: > On Thu, Apr 07, 2022 at 12:14:26PM +0300, Jani Nikula wrote: >> Ever so slowly moving towards cleaner EDID reading. >> >> Jani Nikula (12): >> drm/edid: convert edid_is_zero() to edid_block_is_zero() for blocks >> drm/edid: have edid_block_check() d

[Intel-gfx] [V2 0/3] Expose max and current bpc via debugfs

2022-04-11 Thread Bhanuprakash Modem
This series will expose the Connector's max supported bpc via connector debugfs and Crtc's current bpc via crtc debugfs. Also move the existing vendor specific "output_bpc" logic to drm. Test-with: 20220411094147.1650859-2-bhanuprakash.mo...@intel.com Bhanuprakash Modem (3): drm/debug: Expose c

[Intel-gfx] [V2 1/3] drm/debug: Expose connector's max supported bpc via debugfs

2022-04-11 Thread Bhanuprakash Modem
It's useful to know the connector's max supported bpc for IGT testing. Expose it via a debugfs file on the connector "output_bpc". Example: cat /sys/kernel/debug/dri/0/DP-1/output_bpc V2: * Fix typo in comments (Harry) Cc: Jani Nikula Cc: Ville Syrjälä Cc: Harry Wentland Signed-off-by: Bhanup

[Intel-gfx] [V2 2/3] drm/i915/display/debug: Expose crtc current bpc via debugfs

2022-04-11 Thread Bhanuprakash Modem
This new debugfs will expose the currently using bpc by crtc. It is very useful for verifying whether we enter the correct output color depth from IGT. This patch will also add the connector's max supported bpc to "i915_display_info" debugfs. Example: cat /sys/kernel/debug/dri/0/crtc-0/i915_curre

[Intel-gfx] [V2 3/3] drm/amd/display: Move connector debugfs to drm

2022-04-11 Thread Bhanuprakash Modem
As drm_connector already have the display_info, instead of creating "output_bpc" debugfs in vendor specific driver, move the logic to the drm layer. This patch will also move "Current" bpc to the crtc debugfs from connector debugfs, since we are getting this info from crtc_state. Cc: Harry Wentla

Re: [Intel-gfx] [PATCH] drm/ttm: stop passing NULL fence in ttm_bo_move_sync_cleanup

2022-04-11 Thread Thomas Hellström
Hi, Matthew On 4/11/22 10:56, Matthew Auld wrote: If we hit the sync case, like when skipping clearing for kernel internal objects, or when falling back to cpu clearing, like in i915, we end up trying to add a NULL fence, but with some recent changes in this area this now just results in NULL de

[Intel-gfx] ✓ Fi.CI.BAT: success for Fix issues in skl_pcode_request (rev2)

2022-04-11 Thread Patchwork
== Series Details == Series: Fix issues in skl_pcode_request (rev2) URL : https://patchwork.freedesktop.org/series/102410/ State : success == Summary == CI Bug Log - changes from CI_DRM_11481 -> Patchwork_22838 Summary --- **SUCCESS*

Re: [Intel-gfx] [PATCH] drm/ttm: stop passing NULL fence in ttm_bo_move_sync_cleanup

2022-04-11 Thread Matthew Auld
On 11/04/2022 10:56, Thomas Hellström wrote: Hi, Matthew On 4/11/22 10:56, Matthew Auld wrote: If we hit the sync case, like when skipping clearing for kernel internal objects, or when falling back to cpu clearing, like in i915, we end up trying to add a NULL fence, but with some recent changes

Re: [Intel-gfx] [PATCH] drm/ttm: stop passing NULL fence in ttm_bo_move_sync_cleanup

2022-04-11 Thread Thomas Hellström
On 4/11/22 12:06, Matthew Auld wrote: On 11/04/2022 10:56, Thomas Hellström wrote: Hi, Matthew On 4/11/22 10:56, Matthew Auld wrote: If we hit the sync case, like when skipping clearing for kernel internal objects, or when falling back to cpu clearing, like in i915, we end up trying to add

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/ttm: stop passing NULL fence in ttm_bo_move_sync_cleanup

2022-04-11 Thread Patchwork
== Series Details == Series: drm/ttm: stop passing NULL fence in ttm_bo_move_sync_cleanup URL : https://patchwork.freedesktop.org/series/102483/ State : warning == Summary == Error: dim checkpatch failed db59dc3b0c7f drm/ttm: stop passing NULL fence in ttm_bo_move_sync_cleanup -:14: WARNING:CO

[Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/ttm: stop passing NULL fence in ttm_bo_move_sync_cleanup

2022-04-11 Thread Patchwork
== Series Details == Series: drm/ttm: stop passing NULL fence in ttm_bo_move_sync_cleanup URL : https://patchwork.freedesktop.org/series/102483/ 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.IGT: success for Fix issues in skl_pcode_request (rev2)

2022-04-11 Thread Patchwork
== Series Details == Series: Fix issues in skl_pcode_request (rev2) URL : https://patchwork.freedesktop.org/series/102410/ State : success == Summary == CI Bug Log - changes from CI_DRM_11481_full -> Patchwork_22838_full Summary ---

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/ttm: stop passing NULL fence in ttm_bo_move_sync_cleanup

2022-04-11 Thread Patchwork
== Series Details == Series: drm/ttm: stop passing NULL fence in ttm_bo_move_sync_cleanup URL : https://patchwork.freedesktop.org/series/102483/ State : success == Summary == CI Bug Log - changes from CI_DRM_11481 -> Patchwork_102483v1 Summ

[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/edid: low level EDID block read refactoring etc. (rev4)

2022-04-11 Thread Patchwork
== Series Details == Series: drm/edid: low level EDID block read refactoring etc. (rev4) URL : https://patchwork.freedesktop.org/series/102329/ State : failure == Summary == CI Bug Log - changes from CI_DRM_11481 -> Patchwork_102329v4 Summa

Re: [Intel-gfx] [CI v2 12/12] drm/edid: add EDID block count and size helpers

2022-04-11 Thread kernel test robot
Hi Jani, I love your patch! Perhaps something to improve: [auto build test WARNING on drm-tip/drm-tip] [also build test WARNING on next-20220411] [cannot apply to drm/drm-next drm-intel/for-linux-next v5.18-rc2] [If your patch is applied to the wrong git tree, kindly drop us a note. And when

Re: [Intel-gfx] [CI v2 12/12] drm/edid: add EDID block count and size helpers

2022-04-11 Thread kernel test robot
Hi Jani, I love your patch! Perhaps something to improve: [auto build test WARNING on drm-tip/drm-tip] [also build test WARNING on next-20220411] [cannot apply to drm/drm-next drm-intel/for-linux-next v5.18-rc2] [If your patch is applied to the wrong git tree, kindly drop us a note. And when

[Intel-gfx] ✓ Fi.CI.IGT: success for drm/ttm: stop passing NULL fence in ttm_bo_move_sync_cleanup

2022-04-11 Thread Patchwork
== Series Details == Series: drm/ttm: stop passing NULL fence in ttm_bo_move_sync_cleanup URL : https://patchwork.freedesktop.org/series/102483/ State : success == Summary == CI Bug Log - changes from CI_DRM_11481_full -> Patchwork_102483v1_full

Re: [Intel-gfx] [PATCH 0/4] drm/i915/dg2: Add support for render/media decompression

2022-04-11 Thread Imre Deak
Hi Rodrigo, Jani, On Mon, Apr 04, 2022 at 04:38:42PM +0300, Imre Deak wrote: > This is a rebased version of patches 15-17 of [1], adding DG2 display > engine support for decompressing render and media compressed > framebuffers. > > The dependency patches from [1] should be merged already to drm-t

[Intel-gfx] ✗ Fi.CI.BAT: failure for Expose max and current bpc via debugfs

2022-04-11 Thread Patchwork
== Series Details == Series: Expose max and current bpc via debugfs URL : https://patchwork.freedesktop.org/series/102502/ State : failure == Summary == CI Bug Log - changes from CI_DRM_11481 -> Patchwork_102502v1 Summary --- **FAILU

[Intel-gfx] [PATCH v3 1/2] drm/dp: Factor out a function to probe a DPCD address

2022-04-11 Thread Imre Deak
Factor out from drm_dp_dpcd_read() a function to probe a DPCD address with a 1-byte read access. This will be needed by the next patch doing a read from an LTTPR address, which must happen without the preceding wake-up read in drm_dp_dpcd_read(). While at it add tracing for the 1 byte read even if

Re: [Intel-gfx] [PATCH v3] drm: add a check to verify the size alignment

2022-04-11 Thread Matthew Auld
On 11/04/2022 13:42, Christian König wrote: Am 11.04.22 um 11:47 schrieb Matthew Auld: On 11/04/2022 08:38, Arunpravin Paneer Selvam wrote: Add a simple check to reject any size not aligned to the min_page_size. when size is not aligned to min_page_size, driver module should handle in their o

Re: [Intel-gfx] [PATCH 0/4] drm/i915/dg2: Add support for render/media decompression

2022-04-11 Thread Vivi, Rodrigo
On Mon, 2022-04-11 at 15:38 +0300, Imre Deak wrote: > Hi Rodrigo, Jani, > > On Mon, Apr 04, 2022 at 04:38:42PM +0300, Imre Deak wrote: > > This is a rebased version of patches 15-17 of [1], adding DG2 > > display > > engine support for decompressing render and media compressed > > framebuffers. >

Re: [Intel-gfx] [PATCH 0/4] drm/i915/dg2: Add support for render/media decompression

2022-04-11 Thread Jani Nikula
On Mon, 11 Apr 2022, Imre Deak wrote: > Hi Rodrigo, Jani, TL;DR, all done, for details read on. ;) > On Mon, Apr 04, 2022 at 04:38:42PM +0300, Imre Deak wrote: >> This is a rebased version of patches 15-17 of [1], adding DG2 display >> engine support for decompressing render and media compressed

Re: [Intel-gfx] [CI v2 12/12] drm/edid: add EDID block count and size helpers

2022-04-11 Thread Jani Nikula
On Mon, 11 Apr 2022, kernel test robot wrote: > Hi Jani, > > I love your patch! Perhaps something to improve: > > [auto build test WARNING on drm-tip/drm-tip] > [also build test WARNING on next-20220411] > [cannot apply to drm/drm-next drm-intel/for-linux-next v5.18-rc2

Re: [Intel-gfx] [CI v2 12/12] drm/edid: add EDID block count and size helpers

2022-04-11 Thread Jani Nikula
On Mon, 11 Apr 2022, kernel test robot wrote: > Hi Jani, > > I love your patch! Perhaps something to improve: > > [auto build test WARNING on drm-tip/drm-tip] > [also build test WARNING on next-20220411] > [cannot apply to drm/drm-next drm-intel/for-linux-next v5.18-rc2

[Intel-gfx] [CI v3 00/12] drm/edid: low level EDID block read refactoring etc.

2022-04-11 Thread Jani Nikula
v3 of [1] fixing the (!x == 0) mistake. Resending the entire thing with hopes the test robot picks up the baseline better; I haven't had much luck with --in-reply-to for that. BR, Jani. [1] https://patchwork.freedesktop.org/series/102329/ Jani Nikula (12): drm/edid: convert edid_is_zero() to e

[Intel-gfx] [CI v3 01/12] drm/edid: convert edid_is_zero() to edid_block_is_zero() for blocks

2022-04-11 Thread Jani Nikula
As edid_is_zero() is only ever used on EDID blocks, convert it to edid_block_is_zero() with implicit block size. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä --- drivers/gpu/drm/drm_edid.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/dr

[Intel-gfx] [CI v3 02/12] drm/edid: have edid_block_check() detect blocks that are all zero

2022-04-11 Thread Jani Nikula
We have the check function, have it also detect blocks that are all zero instead of leaving that to callers. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä --- drivers/gpu/drm/drm_edid.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/

[Intel-gfx] [CI v3 03/12] drm/edid: refactor EDID block status printing

2022-04-11 Thread Jani Nikula
Split out a function to log EDID block status. The printouts get changed slightly. Unfortunately, not all users will have struct drm_device available, so we convert to pr_* debug logging instead of drm device based logging. v2: Complain more loudly about unknown status codes (Ville) Signed-off-b

[Intel-gfx] [CI v3 04/12] drm/edid: add a helper to log dump an EDID block

2022-04-11 Thread Jani Nikula
Unify debug log dumping. There's duplication in the error paths for EDID block validity checks, but this should be neglible. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä --- drivers/gpu/drm/drm_edid.c | 33 +++-- 1 file changed, 19 insertions(+), 14 deletion

[Intel-gfx] [CI v3 05/12] drm/edid: pass struct edid to connector_bad_edid()

2022-04-11 Thread Jani Nikula
Avoid casting here and there, and make it const. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä --- drivers/gpu/drm/drm_edid.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index 0b8098e34236..e

[Intel-gfx] [CI v3 06/12] drm/edid: add typedef for block read function

2022-04-11 Thread Jani Nikula
Make the callback a bit easier on the eye. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä --- drivers/gpu/drm/drm_edid.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index e1afd6a55a8c..5b45

[Intel-gfx] [CI v3 07/12] drm/edid: abstract an EDID block read helper

2022-04-11 Thread Jani Nikula
We have an abstraction for the EDID base block read, yet duplicating the retries and error handling for extension block reads. Introduce a more generic EDID block read helper. Switch to the helper piecemeal, starting with drm_edid_get_panel_id(), which doesn't need or have access to the connector

[Intel-gfx] [CI v3 08/12] drm/edid: use EDID block read helper in drm_do_get_edid()

2022-04-11 Thread Jani Nikula
Convert drm_do_get_edit() from the base block read helper to the generic block read helper. There's quite a bit going on here, as the corrupt and null EDID information is moved back to the caller. As we see, they were not all that clear to begin with, and this change underlines that. Signed-off-by

[Intel-gfx] [CI v3 09/12] drm/edid: convert extension block read to EDID block read helper

2022-04-11 Thread Jani Nikula
Use the EDID block read helper also for extension block reads, making edid_block_read() the only place with the read retry logic. Note: We observe that drm_do_get_edid() does not use invalid extension blocks to flag the EDID as corrupt. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä ---

[Intel-gfx] [CI v3 10/12] drm/edid: drop extra local var

2022-04-11 Thread Jani Nikula
We don't need override as a variable for anything. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä --- drivers/gpu/drm/drm_edid.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index 8a050b65c06a..5a1906a

[Intel-gfx] [CI v3 11/12] drm/edid: add single point of return to drm_do_get_edid()

2022-04-11 Thread Jani Nikula
This will be useful in the future. Use fail label for fail exit. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä --- drivers/gpu/drm/drm_edid.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index

[Intel-gfx] [CI v3 12/12] drm/edid: add EDID block count and size helpers

2022-04-11 Thread Jani Nikula
Add some helpers to figure out the EDID extension block count, block count, size, pointers to blocks. Unfortunately, we'll need to cast away the const in a few places where we actually need to access the data. v3: fix (!edid_extension_block_count(edid) == 0) (kernel test robot) v2: fix s/j/i/ in

[Intel-gfx] refactor the i915 GVT support and move to the modern mdev API v3

2022-04-11 Thread Christoph Hellwig
Hi all, the GVT code in the i915 is a bit of a mess right now due to strange abstractions and lots of indirect calls. This series refactors various bits to clean that up. The main user visible change is that almost all of the GVT code moves out of the main i915 driver and into the kvmgt module.

[Intel-gfx] [PATCH 01/34] drm/i915/gvt: remove module refcounting in intel_gvt_{, un}register_hypervisor

2022-04-11 Thread Christoph Hellwig
THIS_MODULE always is reference when a symbol called by it is used, so don't bother with the additional reference. Signed-off-by: Christoph Hellwig --- drivers/gpu/drm/i915/gvt/gvt.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/gpu/drm/i915/gvt/gvt.c b/drivers/gpu/drm/i915/gv

[Intel-gfx] [PATCH 02/34] drm/i915/gvt: remove enum hypervisor_type

2022-04-11 Thread Christoph Hellwig
The only supported hypervisor is KVM, so don't bother with dead code enumerating hypervisors. Signed-off-by: Christoph Hellwig --- drivers/gpu/drm/i915/gvt/gvt.c | 17 +-- drivers/gpu/drm/i915/gvt/gvt.h | 1 - drivers/gpu/drm/i915/gvt/hypercall.h | 6 -- drivers/gpu/drm/i915/gvt

[Intel-gfx] [PATCH 04/34] drm/i915/gvt: don't override the include path

2022-04-11 Thread Christoph Hellwig
drivers/gpu/drm/i915/gvt/Makefile is included from drivers/gpu/drm/i915/Makefile and thus inherits the normal include path relative to drivers/gpu/drm/i915/. Fix up the gvt-specific trace header and just do away with the include path manipulation. Signed-off-by: Christoph Hellwig --- drivers/gp

[Intel-gfx] [PATCH 03/34] drm/i915/gvt: rename intel_vgpu_ops to intel_vgpu_mdev_ops

2022-04-11 Thread Christoph Hellwig
Free the intel_vgpu_ops symbol name for something that fits better. Signed-off-by: Christoph Hellwig --- drivers/gpu/drm/i915/gvt/kvmgt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/gvt/kvmgt.c b/drivers/gpu/drm/i915/gvt/kvmgt.c index 5231ce8084

[Intel-gfx] [PATCH 05/34] drm/i915/gvt: cleanup the Makefile

2022-04-11 Thread Christoph Hellwig
Match the style of the main i915 Makefile in the gvt-specfic one and remove the GVT_DIR and GVT_SOURCE variables. Signed-off-by: Christoph Hellwig --- drivers/gpu/drm/i915/gvt/Makefile | 29 +++-- 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/

[Intel-gfx] [PATCH 07/34] drm/i915/gvt: remove intel_gvt_ops

2022-04-11 Thread Christoph Hellwig
Remove these pointless indirect alls by just calling the only instance of each method directly. Signed-off-by: Christoph Hellwig --- drivers/gpu/drm/i915/gvt/gvt.c | 20 +-- drivers/gpu/drm/i915/gvt/gvt.h | 24 -- drivers/gpu/drm/i915/gvt/hypercall.h | 2

[Intel-gfx] [PATCH 06/34] drm/i915/gvt: move the gvt code into kvmgt.ko

2022-04-11 Thread Christoph Hellwig
Instead of having an option to build the gvt code into the main i915 module, just move it into the kvmgt.ko module. This only requires a new struct with three entries that the KVMGT modules needs to register with the main i915 module, and a proper list of GVT-enabled devices instead of global devi

[Intel-gfx] [PATCH 08/34] drm/i915/gvt: remove the map_gfn_to_mfn and set_trap_area ops

2022-04-11 Thread Christoph Hellwig
The map_gfn_to_mfn and set_trap_area ops are never defined, so remove them and clean up code that depends on them in the callers. Signed-off-by: Christoph Hellwig --- drivers/gpu/drm/i915/gvt/cfg_space.c | 89 ++-- drivers/gpu/drm/i915/gvt/hypercall.h | 4 -- drivers/gpu

[Intel-gfx] [PATCH 09/34] drm/i915/gvt: remove the unused from_virt_to_mfn op

2022-04-11 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- drivers/gpu/drm/i915/gvt/hypercall.h | 1 - drivers/gpu/drm/i915/gvt/kvmgt.c | 6 -- drivers/gpu/drm/i915/gvt/mpt.h | 12 3 files changed, 19 deletions(-) diff --git a/drivers/gpu/drm/i915/gvt/hypercall.h b/drivers/gpu/drm/i915/g

[Intel-gfx] [PATCH 10/34] drm/i915/gvt: merge struct kvmgt_vdev into struct intel_vgpu

2022-04-11 Thread Christoph Hellwig
Move towards having only a single structure for the per-VGPU state. Signed-off-by: Christoph Hellwig --- drivers/gpu/drm/i915/gvt/gvt.h | 31 ++- drivers/gpu/drm/i915/gvt/hypercall.h | 1 - drivers/gpu/drm/i915/gvt/kvmgt.c | 288 ++- drivers/gpu/drm/i915/gvt/

[Intel-gfx] [PATCH 11/34] drm/i915/gvt: merge struct kvmgt_guest_info into strut intel_vgpu

2022-04-11 Thread Christoph Hellwig
Consolidate the per-VGPU structures into a single one. Signed-off-by: Christoph Hellwig --- drivers/gpu/drm/i915/gvt/gvt.h | 8 +++ drivers/gpu/drm/i915/gvt/kvmgt.c | 117 --- 2 files changed, 52 insertions(+), 73 deletions(-) diff --git a/drivers/gpu/drm/i915/gv

[Intel-gfx] [PATCH 12/34] drm/i915/gvt: remove vgpu->handle

2022-04-11 Thread Christoph Hellwig
Always pass the actual vgpu structure instead of encoding it as a "handle" and add a bool flag to denote if a VGPU is attached. Signed-off-by: Christoph Hellwig --- drivers/gpu/drm/i915/gvt/gvt.h | 3 +- drivers/gpu/drm/i915/gvt/hypercall.h | 32 +++ drivers/gpu/drm/i915/gvt/kvmgt.c

[Intel-gfx] [PATCH 13/34] drm/i915/gvt: devirtualize ->{read, write}_gpa

2022-04-11 Thread Christoph Hellwig
Just call the VFIO functions directly instead of through the method table. Signed-off-by: Christoph Hellwig --- drivers/gpu/drm/i915/gvt/cmd_parser.c | 4 +-- drivers/gpu/drm/i915/gvt/execlist.c | 12 - drivers/gpu/drm/i915/gvt/gtt.c| 6 ++--- drivers/gpu/drm/i915/gvt/gvt.h

[Intel-gfx] [PATCH 14/34] drm/i915/gvt: devirtualize ->{get, put}_vfio_device

2022-04-11 Thread Christoph Hellwig
Just open code the calls to the VFIO APIs. Signed-off-by: Christoph Hellwig --- drivers/gpu/drm/i915/gvt/dmabuf.c| 12 ++- drivers/gpu/drm/i915/gvt/hypercall.h | 2 -- drivers/gpu/drm/i915/gvt/kvmgt.c | 22 drivers/gpu/drm/i915/gvt/mpt.h | 30 -

[Intel-gfx] [PATCH 15/34] drm/i915/gvt: devirtualize ->set_edid and ->set_opregion

2022-04-11 Thread Christoph Hellwig
Just call the code to setup the opregions and EDID data directly. Signed-off-by: Christoph Hellwig --- drivers/gpu/drm/i915/gvt/gvt.h | 3 +++ drivers/gpu/drm/i915/gvt/hypercall.h | 3 --- drivers/gpu/drm/i915/gvt/kvmgt.c | 6 ++ drivers/gpu/drm/i915/gvt/mpt.h | 32 ---

[Intel-gfx] [PATCH 16/34] drm/i915/gvt: devirtualize ->detach_vgpu

2022-04-11 Thread Christoph Hellwig
Just call the function directly. Signed-off-by: Christoph Hellwig --- drivers/gpu/drm/i915/gvt/gvt.h | 1 + drivers/gpu/drm/i915/gvt/hypercall.h | 1 - drivers/gpu/drm/i915/gvt/kvmgt.c | 3 +-- drivers/gpu/drm/i915/gvt/mpt.h | 16 drivers/gpu/drm/i915/gvt/vgpu

[Intel-gfx] [PATCH 17/34] drm/i915/gvt: devirtualize ->inject_msi

2022-04-11 Thread Christoph Hellwig
Just open code the MSI injection in a single place instead of going through the method table. Signed-off-by: Christoph Hellwig --- drivers/gpu/drm/i915/gvt/hypercall.h | 1 - drivers/gpu/drm/i915/gvt/interrupt.c | 38 +++- drivers/gpu/drm/i915/gvt/kvmgt.c | 24 --

[Intel-gfx] [PATCH 18/34] drm/i915/gvt: devirtualize ->is_valid_gfn

2022-04-11 Thread Christoph Hellwig
Just call the code directly and move towards the callers. Signed-off-by: Christoph Hellwig --- drivers/gpu/drm/i915/gvt/gtt.c | 20 ++-- drivers/gpu/drm/i915/gvt/hypercall.h | 1 - drivers/gpu/drm/i915/gvt/kvmgt.c | 17 - drivers/gpu/drm/i915/gvt/mpt.h

[Intel-gfx] [PATCH 19/34] drm/i915/gvt: devirtualize ->gfn_to_mfn

2022-04-11 Thread Christoph Hellwig
Just open code it in the only caller. Signed-off-by: Christoph Hellwig --- drivers/gpu/drm/i915/gvt/gtt.c | 9 + drivers/gpu/drm/i915/gvt/hypercall.h | 1 - drivers/gpu/drm/i915/gvt/kvmgt.c | 16 drivers/gpu/drm/i915/gvt/mpt.h | 14 -- 4 fil

[Intel-gfx] [PATCH 20/34] drm/i915/gvt: devirtualize ->{enable, disable}_page_track

2022-04-11 Thread Christoph Hellwig
Just call the kvmgt functions directly. Signed-off-by: Christoph Hellwig --- drivers/gpu/drm/i915/gvt/gvt.h| 3 +++ drivers/gpu/drm/i915/gvt/hypercall.h | 2 -- drivers/gpu/drm/i915/gvt/kvmgt.c | 6 ++ drivers/gpu/drm/i915/gvt/mpt.h| 28 --- d

[Intel-gfx] [PATCH 21/34] drm/i915/gvt: devirtualize ->dma_{, un}map_guest_page

2022-04-11 Thread Christoph Hellwig
Just call the functions directly. Also remove a pointless wrapper. Signed-off-by: Christoph Hellwig --- drivers/gpu/drm/i915/gvt/dmabuf.c| 10 ++ drivers/gpu/drm/i915/gvt/gtt.c | 20 +-- drivers/gpu/drm/i915/gvt/gvt.h | 4 drivers/gpu/drm/i915/gvt/h

[Intel-gfx] [PATCH 22/34] drm/i915/gvt: devirtualize dma_pin_guest_page

2022-04-11 Thread Christoph Hellwig
Just call the function directly and remove a pointless wrapper. Signed-off-by: Christoph Hellwig --- drivers/gpu/drm/i915/gvt/dmabuf.c| 14 +- drivers/gpu/drm/i915/gvt/gvt.h | 1 + drivers/gpu/drm/i915/gvt/hypercall.h | 2 -- drivers/gpu/drm/i915/gvt/kvmgt.c | 4 +---

[Intel-gfx] [PATCH 23/34] drm/i915/gvt: remove struct intel_gvt_mpt

2022-04-11 Thread Christoph Hellwig
Just call the initializion and exit functions directly and remove this abstraction entirely. Signed-off-by: Christoph Hellwig --- drivers/gpu/drm/i915/gvt/gvt.c | 11 - drivers/gpu/drm/i915/gvt/gvt.h | 12 ++--- drivers/gpu/drm/i915/gvt/hypercall.h | 50 --- drive

[Intel-gfx] [PATCH 24/34] drm/i915/gvt: remove the extra vfio_device refcounting for dmabufs

2022-04-11 Thread Christoph Hellwig
All the dmabufs are torn down when th VGPU is released, so there is no need for extra refcounting here. Based on an patch from Jason Gunthorpe. Signed-off-by: Christoph Hellwig --- drivers/gpu/drm/i915/gvt/dmabuf.c | 12 drivers/gpu/drm/i915/gvt/gvt.h| 1 - 2 files changed, 13

[Intel-gfx] [PATCH 25/34] drm/i915/gvt: streamline intel_vgpu_create

2022-04-11 Thread Christoph Hellwig
Initialize variables at declaration time, avoid pointless gotos and cater for the fact that intel_gvt_create_vgpu can't return NULL. Signed-off-by: Christoph Hellwig --- drivers/gpu/drm/i915/gvt/kvmgt.c | 28 +--- 1 file changed, 9 insertions(+), 19 deletions(-) diff --g

[Intel-gfx] [PATCH 26/34] drm/i915/gvt: pass a struct intel_vgpu to the vfio read/write helpers

2022-04-11 Thread Christoph Hellwig
Pass the structure we actually care about instead of deriving it from the mdev_device in the lower level code. Signed-off-by: Christoph Hellwig --- drivers/gpu/drm/i915/gvt/kvmgt.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/

[Intel-gfx] [PATCH 27/34] drm/i915/gvt: remove kvmgt_guest_{init, exit}

2022-04-11 Thread Christoph Hellwig
Merge these into their only callers. Signed-off-by: Christoph Hellwig --- drivers/gpu/drm/i915/gvt/kvmgt.c | 129 ++- 1 file changed, 60 insertions(+), 69 deletions(-) diff --git a/drivers/gpu/drm/i915/gvt/kvmgt.c b/drivers/gpu/drm/i915/gvt/kvmgt.c index 5db74b6fe513

[Intel-gfx] [PATCH 28/34] drm/i915/gvt: convert to use vfio_register_emulated_iommu_dev

2022-04-11 Thread Christoph Hellwig
This is straightforward conversion, the intel_vgpu already has a pointer to the vfio_dev, which can be replaced with the embedded structure and we can replace all the mdev_get_drvdata() with a simple container_of(). Based on an patch from Jason Gunthorpe. Signed-off-by: Christoph Hellwig --- dr

[Intel-gfx] [PATCH 29/34] drm/i915/gvt: merge gvt.c into kvmgvt.c

2022-04-11 Thread Christoph Hellwig
The code in both files is deeply interconnected, so merge it and keep a bunch of structures and functions static. Signed-off-by: Christoph Hellwig --- drivers/gpu/drm/i915/gvt/Makefile | 1 - drivers/gpu/drm/i915/gvt/gvt.c| 291 -- drivers/gpu/drm/i915/gvt/gvt.h

[Intel-gfx] [PATCH 30/34] vfio/mdev: Remove vfio_mdev.c

2022-04-11 Thread Christoph Hellwig
From: Jason Gunthorpe Now that all mdev drivers directly create their own mdev_device driver and directly register with the vfio core's vfio_device_ops this is all dead code. Delete vfio_mdev.c and the mdev_parent_ops members that are connected to it. Signed-off-by: Jason Gunthorpe Signed-off-

[Intel-gfx] [PATCH 31/34] vfio/mdev: Remove mdev_parent_ops dev_attr_groups

2022-04-11 Thread Christoph Hellwig
From: Jason Gunthorpe This is only used by one sample to print a fixed string that is pointless. In general, having a device driver attach sysfs attributes to the parent is horrific. This should never happen, and always leads to some kind of liftime bug as it become very difficult for the sysfs

[Intel-gfx] [PATCH 32/34] vfio/mdev: Remove mdev_parent_ops

2022-04-11 Thread Christoph Hellwig
From: Jason Gunthorpe The last useful member in this struct is the supported_type_groups, move it to the mdev_driver and delete mdev_parent_ops. Replace it with mdev_driver as an argument to mdev_register_device() Signed-off-by: Jason Gunthorpe Signed-off-by: Christoph Hellwig --- .../driver

[Intel-gfx] [PATCH 33/34] vfio/mdev: Use the driver core to create the 'remove' file

2022-04-11 Thread Christoph Hellwig
From: Jason Gunthorpe The device creator is supposed to use the dev.groups value to add sysfs files before device_add is called, not call sysfs_create_files() after device_add() returns. This creates a race with uevent delivery where the extra attribute will not be visible. This was being done b

[Intel-gfx] [PATCH 34/34] vfio/mdev: Remove mdev drvdata

2022-04-11 Thread Christoph Hellwig
From: Jason Gunthorpe This is no longer used, remove it. All usages were moved over to either use container_of() from a vfio_device or to use dev_drvdata() directly on the mdev. Signed-off-by: Jason Gunthorpe Signed-off-by: Christoph Hellwig --- include/linux/mdev.h | 9 - 1 file cha

[Intel-gfx] [PATCH v2 0/4] drm/i915/dg2: Add support for render/media decompression

2022-04-11 Thread Imre Deak
This is v2 of [1] amending the authorship and commit log in patch 4 and adding the r-bs, acks. Resending for CI as well for retesting on drm-tip where the dependency patchset [2] is now also part of the drm-intel-next branch. [1] https://patchwork.freedesktop.org/series/102147/ [2] https://patchwo

  1   2   >