[Intel-gfx] [PATCH 0/2] Selective fetch support for biplanar formats

2021-10-21 Thread Jouni Högander
These patches are implementing selective update configuration for biplanar formats. Also workaround to do full fetch for multi-planar formats is reverted. Jouni Högander (2): drm/i915/display: Add initial selective fetch support for biplanar formats Revert "drm/i915/display/psr: Do

[Intel-gfx] [PATCH 1/2] drm/i915/display: Add initial selective fetch support for biplanar formats

2021-10-21 Thread Jouni Högander
Biplanar formats are using two planes (Y and UV). This patch adds handling of Y selective fetch area by utilizing existing linked plane mechanism. Also UV plane Y offset configuration is modified according to Bspec. Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_psr.c | 30

[Intel-gfx] [PATCH 2/2] Revert "drm/i915/display/psr: Do full fetch when handling multi-planar formats"

2021-10-21 Thread Jouni Högander
This reverts commit 1f61f0655b95d5b89589390e6f83c4a61d9b1e8d. Now we are supporting selective fetch for biplanar formats. We can revert WA patch which forced using full fetch for biplanar formats. Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_psr.c | 4 1 file

[Intel-gfx] [PATCH] drm/i915/display: Ensure PSR gets disabled if no encoders in new state

2022-07-10 Thread Jouni Högander
Reported-by: Stanislav Lisovskiy Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_psr.c | 72 +--- 1 file changed, 51 insertions(+), 21 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index

[Intel-gfx] [PATCH v2] drm/i915/display: Ensure PSR gets disabled if no encoders in new state

2022-07-11 Thread Jouni Högander
ahola Reported-by: Stanislav Lisovskiy Signed-off-by: Jouni Högander Signed-off-by: Stanislav Lisovskiy --- drivers/gpu/drm/i915/display/intel_psr.c | 53 ++-- 1 file changed, 31 insertions(+), 22 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm

[Intel-gfx] [RFC PATCH 1/2] drm/i915: add new flag has_psr2_sel_fetch

2022-01-12 Thread Jouni Högander
This patch is adding new information into intel_device_info to see whether i915 is psr2 selective fetch capable. Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/i915_pci.c | 8 drivers/gpu/drm/i915/intel_device_info.h | 1 + 2 files changed, 9 insertions(+) diff --git

[Intel-gfx] [RFC PATCH 2/2] drm/i915: Use new has_psr2_sel_fetch flag

2022-01-12 Thread Jouni Högander
Now as we have has_psr2_sel_fetch flag we can rely that instead of checking each platform separately. Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_psr.c | 7 --- drivers/gpu/drm/i915/i915_drv.h | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff

[Intel-gfx] [RFC PATCH 0/2] Add has_psr2_sel_fech flag

2022-01-12 Thread Jouni Högander
. Also check for psr2 sel fetch capability is converted to use this instead of checking individual platforms separately. This new flag can be utilized by igt-gpu-tools via i915_capabilities debugfs interface. Cc: José Roberto de Souza Cc: Kahola, Mika Cc: Ville Syrjälä Cc: Imre Deak Jouni

[Intel-gfx] [PATCH 0/2] Fixes for selective fetch area calculation

2022-05-05 Thread Jouni Högander
ensuring update area is within pipe area and falling back to full update. Cc: José Roberto de Souza Cc: Mika Kahola Cc: Mark Pearson Jouni Högander (2): drm/i915/psr: Use full update In case of area calculation fails drm/i915: Ensure damage clip area is within pipe area drivers/gpu/drm/i915

[Intel-gfx] [PATCH 1/2] drm/i915/psr: Use full update In case of area calculation fails

2022-05-05 Thread Jouni Högander
Currently we have some corner cases where area calculation fails. For these sel fetch are calculation ends up having update area as y1 = 0, y2 = 4. Instead of these values safer option is full update. Cc: José Roberto de Souza Cc: Mika Kahola Tested-by: Mark Pearson Signed-off-by: Jouni

[Intel-gfx] [PATCH 2/2] drm/i915: Ensure damage clip area is within pipe area

2022-05-05 Thread Jouni Högander
: Mika Kahola Tested-by: Mark Pearson Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_psr.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index

[Intel-gfx] [PATCH v2 0/2] Fixes for selective fetch area calculation

2022-05-09 Thread Jouni Högander
these by ensuring update area is within pipe area and falling back to full update. v2: - Update commit message of first patch - Set damaged_area x1 and x2 during initialization Cc: José Roberto de Souza Cc: Mika Kahola Cc: Mark Pearson Jouni Högander (2): drm/i915/psr: Use full update In case

[Intel-gfx] [PATCH v2 1/2] drm/i915/psr: Use full update In case of area calculation fails

2022-05-09 Thread Jouni Högander
et in psr2_sel_fetch_update. Currently it's open what is the proper way to fix this corner case. Use full update for now. v2: Commit message modified Cc: José Roberto de Souza Cc: Mika Kahola Tested-by: Mark Pearson Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_psr.c | 3 +++ 1 fi

[Intel-gfx] [PATCH v2 2/2] drm/i915: Ensure damage clip area is within pipe area

2022-05-09 Thread Jouni Högander
/intel/-/issues/5440 Cc: José Roberto de Souza Cc: Mika Kahola Tested-by: Mark Pearson Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_psr.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b

[Intel-gfx] [PATCH v3 0/3] Fixes for selective fetch area calculation

2022-05-10 Thread Jouni Högander
sel fetch area calculation fails - Move drm_rect_intersect to clip_area_update v2: - Update commit message of first patch - Set damaged_area x1 and x2 during initialization Cc: José Roberto de Souza Cc: Mika Kahola Cc: Mark Pearson Jouni Högander (3): drm/print: Add drm_debug_once* macros

[Intel-gfx] [PATCH v3 1/3] drm/print: Add drm_debug_once* macros

2022-05-10 Thread Jouni Högander
Add drm_debug_once* macros to allow printing out one time debug messages which can be still controlled via drm.debug parameter. Cc: José Roberto de Souza Cc: Mika Kahola Cc: Mark Pearson Signed-off-by: Jouni Högander --- include/drm/drm_print.h | 29 + 1 file

[Intel-gfx] [PATCH v3 2/3] drm/i915/psr: Use full update In case of area calculation fails

2022-05-10 Thread Jouni Högander
et in psr2_sel_fetch_update. Currently it's open what is the proper way to fix this corner case. Use full update for now. v2: Commit message modified v3: Print out debug info once when area calculation fails Cc: José Roberto de Souza Cc: Mika Kahola Cc: Mark Pearson Signed-off-by: Jouni Högander --- d

[Intel-gfx] [PATCH v3 3/3] drm/i915: Ensure damage clip area is within pipe area

2022-05-10 Thread Jouni Högander
clip_area_update Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/5440 Cc: José Roberto de Souza Cc: Mika Kahola Cc: Mark Pearson Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_psr.c | 24 +--- 1 file changed, 17 insertions(+), 7 deletions(-) diff

[Intel-gfx] [PATCH v4 0/2] Fixes for selective fetch area calculation

2022-05-13 Thread Jouni Högander
v2: - Update commit message of first patch - Set damaged_area x1 and x2 during initialization Cc: José Roberto de Souza Cc: Mika Kahola Cc: Mark Pearson Jouni Högander (2): drm/i915/psr: Use full update In case of area calculation fails drm/i915: Ensure damage clip area is within pipe area driv

[Intel-gfx] [PATCH v4 2/2] drm/i915: Ensure damage clip area is within pipe area

2022-05-13 Thread Jouni Högander
clip_area_update v4: draw_area -> pipe_src Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/5440 Cc: José Roberto de Souza Cc: Mika Kahola Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_psr.c | 23 --- 1 file changed, 16 insertions(+), 7 deleti

[Intel-gfx] [PATCH v4 1/2] drm/i915/psr: Use full update In case of area calculation fails

2022-05-13 Thread Jouni Högander
et in psr2_sel_fetch_update. Currently it's open what is the proper way to fix this corner case. Use full update for now. v2: Commit message modified v3: Print out debug info once when area calculation fails v4: Use drm_info_once Cc: José Roberto de Souza Cc: Mika Kahola Signed-off-by: Jouni Högander --

[Intel-gfx] [PATCH v5 0/2] Fixes for selective fetch area calculation

2022-05-13 Thread Jouni Högander
on fails - Move drm_rect_intersect to clip_area_update v2: - Update commit message of first patch - Set damaged_area x1 and x2 during initialization Cc: José Roberto de Souza Cc: Mika Kahola Cc: Mark Pearson Jouni Högander (2): drm/i915/psr: Use full update In case of area calculation fails

[Intel-gfx] [PATCH v5 1/2] drm/i915/psr: Use full update In case of area calculation fails

2022-05-13 Thread Jouni Högander
Souza Cc: Mika Kahola Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_psr.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index 06db407e2749..fecdaaeac39e 100644 ---

[Intel-gfx] [PATCH v5 2/2] drm/i915: Ensure damage clip area is within pipe area

2022-05-13 Thread Jouni Högander
clip_area_update v4: draw_area -> pipe_src Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/5440 Cc: José Roberto de Souza Cc: Mika Kahola Reviewed-by: José Roberto de Souza Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_psr.c | 23 --- 1 file chan

[Intel-gfx] [RFC PATCH] drm/i915: Debugfs statistics interface for psr

2022-05-18 Thread Jouni Högander
g to perform selective update. Cc: José Roberto de Souza Cc: Mika Kahola Cc: Uma Shankar Cc: Nischal Varide Signed-off-by: Jouni Högander --- .../drm/i915/display/intel_display_debugfs.c | 100 .../drm/i915/display/intel_display_types.h| 16 ++ drivers/gpu

[Intel-gfx] [PATCH 0/2] Disable connector polling for a headless sku

2022-06-03 Thread Jouni Högander
This patch set disables connector polling when entering runtime suspend for headless sku to prevent waking it up again when poll is performed. Cc: Imre Deak Cc: Anshuman Gupta Jouni Högander (2): drm/i915/opregion: add function to check if headless sku drm/i915: do not start connector

[Intel-gfx] [PATCH 1/2] drm/i915/opregion: add function to check if headless sku

2022-06-03 Thread Jouni Högander
Export headless sku bit (bit 13) from opregion->header->pcon as an interface to check if our device is headless configuration. Bspec: 53441 Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_opregion.c | 12 drivers/gpu/drm/i915/display/intel_opregion.

[Intel-gfx] [PATCH 2/2] drm/i915: do not start connector polling when headless sku

2022-06-03 Thread Jouni Högander
Connector polling is waking up the polled device. Polling is unnecessary if our device is known to not have display. Fix this and Save some power by disabling starting connector polling when we are having headless sku. Use information from opregion. Signed-off-by: Jouni Högander --- drivers

[Intel-gfx] [PATCH v2 0/3] Disable connector polling for a headless sku

2022-06-10 Thread Jouni Högander
This patch set disables connector polling when entering runtime suspend for headless sku to prevent waking it up again when poll is performed. v2: - integrate headless check into INTEL_DISPLAY_ENABLED Cc: Jani Nikula Cc: José Roberto de Souza Cc: Imre Deak Cc: Anshuman Gupta Jouni Högander

[Intel-gfx] [PATCH v2 1/3] drm/i915/opregion: add function to check if headless sku

2022-06-10 Thread Jouni Högander
is headless graphics card. v2: Check also opregion version Bspec: 53441 Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_opregion.c | 14 ++ drivers/gpu/drm/i915/display/intel_opregion.h | 7 +++ 2 files changed, 21 insertions(+) diff --git a/drivers/gpu/drm/i

[Intel-gfx] [PATCH v2 2/3] drm/i915: Do not start connector polling if display is disabled

2022-06-10 Thread Jouni Högander
Currently we are starting connector polling if display is disabled using disable_display module parameter. Polling is just returning always "not connected" state. This can be optimized by not starting polling at all. Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel

[Intel-gfx] [PATCH v2 3/3] drm/i915: Do not start connector polling on headless sku

2022-06-10 Thread Jouni Högander
INTEL_DISPLAY_ENABLED macro Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/i915_drv.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index eba94fa76b18..db37806967cc 100644 --- a/drivers/gpu/drm/i915/i915_drv.h

[Intel-gfx] [PATCH v3 0/3] Disable connector polling for a headless sku

2022-06-10 Thread Jouni Högander
Roberto de Souza Cc: Imre Deak Cc: Anshuman Gupta Jouni Högander (3): drm/i915/opregion: add function to check if headless sku drm/i915: Do not start connector polling if display is disabled drm/i915: Do not start connector polling on headless sku drivers/gpu/drm/i915/display/intel_hotplug.c

[Intel-gfx] [PATCH v3 2/3] drm/i915: Do not start connector polling if display is disabled

2022-06-10 Thread Jouni Högander
Currently we are starting connector polling if display is disabled using disable_display module parameter. Polling is just returning always "not connected" state. This can be optimized by not starting polling at all. Signed-off-by: Jouni Högander Reviewed-by: Jani Nikula --- drive

[Intel-gfx] [PATCH v3 1/3] drm/i915/opregion: add function to check if headless sku

2022-06-10 Thread Jouni Högander
is headless graphics card. v3: Dummy version is now static inline function v2: Check also opregion version Bspec: 53441 Reviewed-by: Jani Nikula Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_opregion.c | 14 ++ drivers/gpu/drm/i915/display/intel_opregion.h | 7 +

[Intel-gfx] [PATCH v3 3/3] drm/i915: Do not start connector polling on headless sku

2022-06-10 Thread Jouni Högander
INTEL_DISPLAY_ENABLED macro Signed-off-by: Jouni Högander Reviewed-by: Jani Nikula --- drivers/gpu/drm/i915/i915_drv.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 9805c6e6d4da..a5bc6a774c5a 100644 --- a/drivers

[Intel-gfx] [PATCH 3/3] drm/i915/display: Use drm helper instead of own loop for damage clips

2022-07-16 Thread Jouni Högander
Use existing drm_atomic_helper_damage_merged from generic drm code instead of implementing own loop to iterate over damage_clips. Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_psr.c | 17 + 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a

[Intel-gfx] [PATCH 2/3] drm/i915/display: Use original src in psr2 sel fetch area calculation

2022-07-16 Thread Jouni Högander
ace. To compare these against src coordinates we need to use original coordinates as provided by user-space. These can be obtained by using drm_plane_state_src. Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_psr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --

[Intel-gfx] [PATCH 1/3] drm: Use original src rect while initializing damage iterator

2022-07-16 Thread Jouni Högander
are still relative to original src coords provided by user-space. This patch ensures original coordinates provided by user-space are used when initiliazing damage iterator. Signed-off-by: Jouni Högander --- drivers/gpu/drm/drm_damage_helper.c | 11 +++ 1 file changed, 7 insertions(+)

[Intel-gfx] [PATCH 0/3] Fixes for damage clips handling

2022-07-16 Thread Jouni Högander
user-space instead of drm_plane_state.src when iterating damage_clips. Cc: Daniel Vetter Cc: Maarten Lankhorst Cc: Jani Nikula Cc: Ville Syrjälä Cc: José Roberto de Souza Cc: Mika Kahola Jouni Högander (3): drm: Use original src rect while initializing damage iterator drm/i915/display: Use

[Intel-gfx] [PATCH v3 0/3] HDR aux backlight range calculation

2022-07-19 Thread Jouni Högander
: Harry Wentland Cc: Lyude Paul Cc: Mika Kahola Cc: Jani Nikula Cc: Manasi Navare Jouni Högander (3): drm: New function to get luminance range based on static hdr metadata drm/amdgpu_dm: Rely on split out luminance calculation function drm/i915: Use luminance range calculated during edid

[Intel-gfx] [PATCH v3 1/3] drm: New function to get luminance range based on static hdr metadata

2022-07-19 Thread Jouni Högander
go Siqueira Cc: Harry Wentland Cc: Lyude Paul Cc: Mika Kahola Cc: Jani Nikula Cc: Manasi Navare Signed-off-by: Jouni Högander Acked-by: Jani Nikula --- drivers/gpu/drm/drm_edid.c | 52 - include/drm/drm_connector.h | 21 +++ 2 files changed, 72

[Intel-gfx] [PATCH v3 2/3] drm/amdgpu_dm: Rely on split out luminance calculation function

2022-07-19 Thread Jouni Högander
queira Cc: Harry Wentland Cc: Lyude Paul Cc: Mika Kahola Cc: Jani Nikula Cc: Manasi Navare Signed-off-by: Jouni Högander --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 35 +++ 1 file changed, 4 insertions(+), 31 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amd

[Intel-gfx] [PATCH v3 3/3] drm/i915: Use luminance range calculated during edid parsing

2022-07-19 Thread Jouni Högander
-off-by: Jouni Högander --- .../gpu/drm/i915/display/intel_dp_aux_backlight.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c index c92d5bb2326a

[Intel-gfx] [PATCH] drm/i915/backlight: Disable pps power hook for aux based backlight

2022-08-22 Thread Jouni Högander
Pps power hook seems to be problematic for backlight controlled via aux channel. Disable it for such cases. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/3657 Signed-off-by: Jouni Högander Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_backlight.c | 11

[Intel-gfx] [PATCH] drm/i915: Check EDID before dpcd for possible HDR aux bl support

2022-04-11 Thread Jouni Högander
this data block exists. Fixes: 4a8d79901d5b ("drm/i915/dp: Enable Intel's HDR backlight interface (only SDR for now)") Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/5284 Cc: Lyude Paul Cc: Mika Kahola Cc: Jani Nikula Tested-by: Filippo Falezza Signed-off-by:

[Intel-gfx] [PATCH v2] drm/i915: Check EDID for HDR static metadata when choosing blc

2022-04-13 Thread Jouni Högander
/issues/5284 Cc: Lyude Paul Cc: Mika Kahola Cc: Jani Nikula Cc: Filippo Falezza Cc: sta...@vger.kernel.org Signed-off-by: Jouni Högander --- .../drm/i915/display/intel_dp_aux_backlight.c | 34 ++- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/d

[Intel-gfx] [PATCH] drm/i915/psr: Set "SF Partial Frame Enable" also on full update

2022-02-23 Thread Jouni Högander
AN_TRK_CTL_ENABLE only if not on ADLP as this bit doesn't exist in ADLP. Bspec: 49274 Reported-by: Lyude Paul Cc: Mihai Harpau Cc: José Roberto de Souza Cc: Ville Syrjälä Bugzilla: https://gitlab.freedesktop.org/drm/intel/-/issues/5077 Signed-off-by: Jouni Högander --- drivers/gpu/drm

[Intel-gfx] [PATCH v2] drm/i915/psr: Set "SF Partial Frame Enable" also on full update

2022-02-23 Thread Jouni Högander
AN_TRK_CTL_ENABLE only if not on ADLP as this bit doesn't exist in ADLP. Bspec: 49274 v2: Fix Mihai Harpau email address Reported-by: Lyude Paul Cc: Mihai Harpau Cc: José Roberto de Souza Cc: Ville Syrjälä Bugzilla: https://gitlab.freedesktop.org/drm/intel/-/issues/5077 Signed-off-by: Jo

[Intel-gfx] [PATCH v3] drm/i915/psr: Set "SF Partial Frame Enable" also on full update

2022-02-24 Thread Jouni Högander
de Paul Cc: Mihai Harpau Cc: José Roberto de Souza Cc: Ville Syrjälä Bugzilla: https://gitlab.freedesktop.org/drm/intel/-/issues/5077 Signed-off-by: Jouni Högander Reviewed-by: José Roberto de Souza --- drivers/gpu/drm/i915/display/intel_psr.c | 16 ++-- drivers/gpu/drm/i915/i915_reg

[Intel-gfx] [RFC PATCH 0/2] Remove frontbuffer tracking from the gem code

2022-03-02 Thread Jouni Högander
intel_fbdev code. Cc: Ville Syrjälä Cc: Jani Nikula Cc: Daniel Vetter Cc: José Roberto de Souza Jouni Högander (2): drm/i915/fbdev: Remove frontbuffer tracking calls drm/i915: Remove all frontbuffer tracking calls from the gem code drivers/gpu/drm/i915/display/intel_fbdev.c | 62

[Intel-gfx] [RFC PATCH 1/2] drm/i915/fbdev: Remove frontbuffer tracking calls

2022-03-02 Thread Jouni Högander
Intel_fbdev can use drm_helper functions which are calling dirtyfb callback. Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_fbdev.c | 62 ++ 1 file changed, 4 insertions(+), 58 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_fbdev.c b

[Intel-gfx] [RFC PATCH 2/2] drm/i915: Remove all frontbuffer tracking calls from the gem code

2022-03-02 Thread Jouni Högander
We should now rely on userspace doing dirtyfb. There is no need to have separate frontbuffer tracking hooks in gem code. This patch is removing all frontbuffer tracking calls from the gem code. Signed-off-by: Jouni Högander Reviewed-by: Maarten Lankhorst --- drivers/gpu/drm/i915/display

[Intel-gfx] [RFC PATCH] drm/i915: Remove all frontbuffer tracking calls from the gem code

2022-01-26 Thread Jouni Högander
We should now rely on userspace doing dirtyfb. There is no need to have separate frontbuffer tracking hooks in gem code. This patch is removing all frontbuffer tracking calls from the gem code. Cc: Ville Syrjälä Cc: Jani Nikula Cc: Daniel Vetter Signed-off-by: Jouni Högander --- drivers/gpu

[Intel-gfx] [PATCH v2 0/4] Fixes for damage clips handling

2022-08-23 Thread Jouni Högander
user-space instead of drm_plane_state.src when iterating damage_clips. v2: Modify drm unit tests accordingly Cc: Daniel Vetter Cc: Maarten Lankhorst Cc: Jani Nikula Cc: Ville Syrjälä Cc: José Roberto de Souza Cc: Mika Kahola Cc: Maíra Canal Jouni Högander (4): drm: Use original src rect

[Intel-gfx] [PATCH v2 2/4] drm/i915/display: Use original src in psr2 sel fetch area calculation

2022-08-23 Thread Jouni Högander
ace. To compare these against src coordinates we need to use original coordinates as provided by user-space. These can be obtained by using drm_plane_state_src. Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_psr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --

[Intel-gfx] [PATCH v2 1/4] drm: Use original src rect while initializing damage iterator

2022-08-23 Thread Jouni Högander
are still relative to original src coords provided by user-space. This patch ensures original coordinates provided by user-space are used when initiliazing damage iterator. Signed-off-by: Jouni Högander --- drivers/gpu/drm/drm_damage_helper.c | 11 +++ 1 file changed, 7 insertions(+)

[Intel-gfx] [PATCH v2 3/4] drm/i915/display: Use drm helper instead of own loop for damage clips

2022-08-23 Thread Jouni Högander
Use existing drm_atomic_helper_damage_merged from generic drm code instead of implementing own loop to iterate over damage_clips. Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_psr.c | 17 + 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a

[Intel-gfx] [PATCH v2 4/4] drm/tests: Set also mock plane src_x, src_y, src_w and src_h

2022-08-23 Thread Jouni Högander
We need to set also src_x, src_y, src_w and src_h for the mock plane. After fix for drm_atomic_helper_damage_iter_init we are using these when iterating damage_clips. Signed-off-by: Jouni Högander --- drivers/gpu/drm/tests/drm_damage_helper_test.c | 5 + 1 file changed, 5 insertions

[Intel-gfx] [PATCH 0/2] drm/i915/psr: Disable PSR2 when SDP is sent on prior line

2022-09-05 Thread Jouni Högander
. Cc: Mika Kahola Cc: José Roberto de Souza Jouni Högander (2): drm/i915/psr: Equation changed for sending start/stop on prior line drm/i915/psr: Disable PSR2 when SDP is sent on prior line drivers/gpu/drm/i915/display/intel_psr.c | 7 --- 1 file changed, 4 insertions(+), 3 dele

[Intel-gfx] [PATCH 1/2] drm/i915/psr: Equation changed for sending start/stop on prior line

2022-09-05 Thread Jouni Högander
Equation for sending start/end SDP prior to the SU region start/end has changed. Update used formula. Bspec: 49274 Cc: Mika Kahola Cc: José Roberto de Souza Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_psr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

[Intel-gfx] [PATCH 2/2] drm/i915/psr: Disable PSR2 when SDP is sent on prior line

2022-09-05 Thread Jouni Högander
Selective update doesn't work if SU start address is 0 and start/end SDP is configured to be sent prior to SU start/end lines. PSR2 has to be disabled in this case for Alder Lake. HSDES: 22012279113 Cc: Mika Kahola Cc: José Roberto de Souza Signed-off-by: Jouni Högander --- drivers/gp

[Intel-gfx] [PATCH v2 1/4] drm/i915/fbc: Clear frontbuffer busy bits on flip

2023-07-26 Thread Jouni Högander
We are planning to move flush performed from work queue. This means it is possible to have invalidate -> flip -> flush sequence. Handle this by clearing possible busy bits on flip. Signed-off-by: Ville Syrjälä Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_fbc

[Intel-gfx] [PATCH v2 2/4] drm/i915/psr: Clear frontbuffer busy bits on flip

2023-07-26 Thread Jouni Högander
We are planning to move flush performed from work queue. This means it is possible to have invalidate -> flip -> flush sequence. Handle this by clearing possible busy bits on flip. Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_psr.c | 6 ++ 1 file chan

[Intel-gfx] [PATCH v2 0/4] Handle dma fences in dirtyfb ioctl

2023-07-26 Thread Jouni Högander
. This patch set is adding dma fence handling into i915 dirtyfb ioctl. v2: - Clear fbc and psr busy bits on flip - Check if flush work is already pending - Use dma_resv_get_singleton Cc: Ville Syrjälä Cc: Maarten Lankhorst Jouni Högander (4): drm/i915/fbc: Clear frontbuffer busy bits on

[Intel-gfx] [PATCH v2 4/4] drm/i915: Handle dma fences in dirtyfb callback

2023-07-26 Thread Jouni Högander
Take into account dma fences in dirtyfb callback. If there is no unsignaled dma fences perform flush immediately. If there are unsignaled dma fences perform invalidate and add callback which will queue flush when the fence gets signaled. v2: Use dma_resv_get_singleton Signed-off-by: Jouni

[Intel-gfx] [PATCH v2 3/4] drm/i915: Add new frontbuffer tracking interface to queue flush

2023-07-26 Thread Jouni Högander
. v2: Check if flush work is already pending Signed-off-by: Jouni Högander --- .../gpu/drm/i915/display/intel_frontbuffer.c | 33 +++ .../gpu/drm/i915/display/intel_frontbuffer.h | 4 +++ 2 files changed, 37 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_frontbuf

[Intel-gfx] [PATCH v4 0/4] Do not access i915_gem_object members from frontbuffer tracking

2023-07-26 Thread Jouni Högander
Jouni Högander (4): drm/i915: Add macros to get i915 device from i915_gem_object drm/i915: Add getter/setter for i915_gem_object->frontbuffer drm/i915/display: Remove i915_gem_object_types.h from intel_frontbuffer.h drm/i915: Add function to clear scanout flag for vmas .../gpu/drm/i

[Intel-gfx] [PATCH v4 1/4] drm/i915: Add macros to get i915 device from i915_gem_object

2023-07-26 Thread Jouni Högander
We want to stop touching directly i915_gem_object struct members in intel_frontbuffer code. As a part of this we add helper macro to get i915 device from i915_gem_object. v2: operate on and return pointer in defined macros Signed-off-by: Jouni Högander Reviewed-by: Jani Nikula --- .../gpu/drm

[Intel-gfx] [PATCH v4 3/4] drm/i915/display: Remove i915_gem_object_types.h from intel_frontbuffer.h

2023-07-26 Thread Jouni Högander
Now as we have removed all the references to internals of i915_gem_object from the frontbuffer header we can also remove including i915_gem_object_types.h. Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_frontbuffer.h | 1 - 1 file changed, 1 deletion(-) diff --git a

[Intel-gfx] [PATCH v4 2/4] drm/i915: Add getter/setter for i915_gem_object->frontbuffer

2023-07-26 Thread Jouni Högander
Add getter/setter for i915_gem_object->frontbuffer and use it instead of directly touching i915_gem_object->frontbuffer frontbuffer pointer. v3: - Fix intel_frontbuffer_get return value - s/front_ret/cur/ v2: Move getter/setter into i915_gem_object.h Signed-off-by: Jouni Högander --- .

[Intel-gfx] [PATCH v4 4/4] drm/i915: Add function to clear scanout flag for vmas

2023-07-26 Thread Jouni Högander
Currently frontbuffer tracking code is directly iterating over object vmas and clearing scanout flags for them. Add function to clear scanout flag for vmas and use it from frontbuffer tracking code. v2: describe function parameter. Signed-off-by: Jouni Högander Reviewed-by: Jani Nikula

[Intel-gfx] [PATCH] drm/i915/psr: Add psr sink error status into sink status debugfs

2023-08-28 Thread Jouni Högander
into PSR sink status debugfs interface. Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_psr.c | 34 +--- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c

[Intel-gfx] [PATCH] drm/i915/psr: Apply Wa_14015648006 for all display 14 steppings

2023-08-29 Thread Jouni Högander
According to recent Bspec Wa 14015648006 has to be applied for all display 14 steppings. Bspec: 66624 Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_psr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b

[Intel-gfx] [PATCH v3 4/4] drm/i915: Handle dma fences in dirtyfb callback

2023-08-30 Thread Jouni Högander
- Flush only when adding fence cb succeeds v2: Use dma_resv_get_singleton Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_fb.c | 60 +++-- 1 file changed, 57 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_fb.c b/drivers/gpu

[Intel-gfx] [PATCH v3 0/4] Handle dma fences in dirtyfb ioctl

2023-08-30 Thread Jouni Högander
: - Clear fbc and psr busy bits on flip - Check if flush work is already pending - Use dma_resv_get_singleton Cc: Ville Syrjälä Cc: Maarten Lankhorst Jouni Högander (4): drm/i915/fbc: Clear frontbuffer busy bits on flip drm/i915/psr: Clear frontbuffer busy bits on flip drm/i915: Add new

[Intel-gfx] [PATCH v3 3/4] drm/i915: Add new frontbuffer tracking interface to queue flush

2023-08-30 Thread Jouni Högander
. v3: - Check schedule work success rather than work being pending - Init flush work when frontbuffer struct is initialized v2: Check if flush work is already pending Signed-off-by: Jouni Högander --- .../gpu/drm/i915/display/intel_frontbuffer.c | 28 +++ .../gpu/drm/i915/di

[Intel-gfx] [PATCH v3 1/4] drm/i915/fbc: Clear frontbuffer busy bits on flip

2023-08-30 Thread Jouni Högander
We are planning to move flush performed from work queue. This means it is possible to have invalidate -> flip -> flush sequence. Handle this by clearing possible busy bits on flip. Signed-off-by: Ville Syrjälä Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_fbc

[Intel-gfx] [PATCH v3 2/4] drm/i915/psr: Clear frontbuffer busy bits on flip

2023-08-30 Thread Jouni Högander
We are planning to move flush performed from work queue. This means it is possible to have invalidate -> flip -> flush sequence. Handle this by clearing possible busy bits on flip. Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_psr.c | 6 ++ 1 file chan

[Intel-gfx] [PATCH v4 0/4] Handle dma fences in dirtyfb ioctl

2023-09-01 Thread Jouni Högander
- Init flush work when frontbuffer struct is initialized v2: - Clear fbc and psr busy bits on flip - Check if flush work is already pending - Use dma_resv_get_singleton Cc: Ville Syrjälä Cc: Maarten Lankhorst Jouni Högander (4): drm/i915/fbc: Clear frontbuffer busy bits on flip drm/i915

[Intel-gfx] [PATCH v4 1/4] drm/i915/fbc: Clear frontbuffer busy bits on flip

2023-09-01 Thread Jouni Högander
We are planning to move flush performed from work queue. This means it is possible to have invalidate -> flip -> flush sequence. Handle this by clearing possible busy bits on flip. Signed-off-by: Ville Syrjälä Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_fbc

[Intel-gfx] [PATCH v4 2/4] drm/i915/psr: Clear frontbuffer busy bits on flip

2023-09-01 Thread Jouni Högander
We are planning to move flush performed from work queue. This means it is possible to have invalidate -> flip -> flush sequence. Handle this by clearing possible busy bits on flip. Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_psr.c | 6 ++ 1 file chan

[Intel-gfx] [PATCH v4 3/4] drm/i915: Add new frontbuffer tracking interface to queue flush

2023-09-01 Thread Jouni Högander
. v3: - Check schedule work success rather than work being pending - Init flush work when frontbuffer struct is initialized v2: Check if flush work is already pending Signed-off-by: Jouni Högander --- .../gpu/drm/i915/display/intel_frontbuffer.c | 28 +++ .../gpu/drm/i915/di

[Intel-gfx] [PATCH v4 4/4] drm/i915: Handle dma fences in dirtyfb callback

2023-09-01 Thread Jouni Högander
: - Check frontbuffer bits before adding any fence fb - Flush only when adding fence cb succeeds v2: Use dma_resv_get_singleton Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_fb.c | 60 +++-- 1 file changed, 57 insertions(+), 3 deletions(-) diff --git a/drivers

[Intel-gfx] [PATCH 1/2] drm/i915: Add new frontbuffer tracking interface to queue flush

2023-04-17 Thread Jouni Högander
flush. Signed-off-by: Jouni Högander --- .../gpu/drm/i915/display/intel_frontbuffer.c | 33 +++ .../gpu/drm/i915/display/intel_frontbuffer.h | 4 +++ 2 files changed, 37 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_frontbuffer.c b/drivers/gpu/drm/i915/di

[Intel-gfx] [PATCH 2/2] drm/i915: Handle dma fences in dirtyfb callback

2023-04-17 Thread Jouni Högander
Take into account dma fences in dirtyfb callback. If there is no unsignaled dma fences perform flush immediately. If there are unsignaled dma fences perform invalidate and add callback which will queue flush when the fence gets signaled. Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915

[Intel-gfx] [PATCH 0/2] Handle dma fences in dirtyfb ioctl

2023-04-17 Thread Jouni Högander
. This patch set is adding dma fence handling into i915 dirtyfb ioctl. Cc: Ville Syrjälä Cc: Maarten Lankhorst Jouni Högander (2): drm/i915: Add new frontbuffer tracking interface to queue flush drm/i915: Handle dma fences in dirtyfb callback drivers/gpu/drm/i915/display/intel_fb.c

[Intel-gfx] [PATCH] drm/i915: Remove runtime suspended boolean from intel_runtime_pm struct

2023-09-13 Thread Jouni Högander
ff-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_display_power.c | 2 +- drivers/gpu/drm/i915/i915_driver.c | 3 --- drivers/gpu/drm/i915/i915_gpu_error.c | 2 +- drivers/gpu/drm/i915/intel_runtime_pm.c| 1 - drivers/gpu/drm/i915/intel_runtime

[Intel-gfx] [PATCH] drm/i915: Ignore set frontbuffer return value on release

2023-09-27 Thread Jouni Högander
i915_gem_object_set_frontbuffer returns set frontbuffer pointer. When we are releasing frontbuffer we are clearing the pointer from the object and the value can be ignored. Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_frontbuffer.c | 2 +- 1 file changed, 1 insertion

[Intel-gfx] [PATCH v2] drm/i915: Warn on if set frontbuffer return value is not NULL on release

2023-09-27 Thread Jouni Högander
i915_gem_object_set_frontbuffer returns set frontbuffer pointer. When we are releasing frontbuffer we are clearing the pointer from the object. Warn on if return value is not null. v2: Instead of ignoring do drm_WARN_ON Cc: Rodrigo Vivi Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915

[Intel-gfx] [PATCH v3] drm/i915: Warn on if set frontbuffer return value is not NULL on release

2023-09-28 Thread Jouni Högander
: Rodrigo Vivi Cc: Jani Nikula Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_frontbuffer.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_frontbuffer.c b/drivers/gpu/drm/i915/display/intel_frontbuffer.c index

[Intel-gfx] [PATCH] drm/i915/display: Include i915_active header in frontbuffer tracking code

2023-09-29 Thread Jouni Högander
Intel frontbuffer tracking code is using i915_active functions -> include i915_active.h directly instead of relying getting indirectly included. Cc: Jani Nikula Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_frontbuffer.c | 1 + 1 file changed, 1 insertion(+) diff --

[Intel-gfx] [RFC PATCH 0/4] Framework for display parameters

2023-10-04 Thread Jouni Högander
and taking into account varying driver name. Also fbc and psr related parameter are moved as an example. Cc: Jani Nikula Cc: Uma Shankar Cc: Maarten Lankhorst Jouni Högander (4): drm/i915/display: Add framework to add parameters specific to display drm/i915/display: Dump also display

[Intel-gfx] [RFC PATCH 1/4] drm/i915/display: Add framework to add parameters specific to display

2023-10-04 Thread Jouni Högander
patches. Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/Makefile | 2 + .../gpu/drm/i915/display/intel_display_core.h | 2 + .../drm/i915/display/intel_display_debugfs.c | 2 + .../display/intel_display_debugfs_params.c| 239 ++ .../display

[Intel-gfx] [RFC PATCH 2/4] drm/i915/display: Dump also display parameters into GPU error dump

2023-10-04 Thread Jouni Högander
GPU error dump contained all module parameters. If we are moving display parameters to intel_display_params.[ch] they are not dumped into GPU error dump. This patch is adding moved display parameters back to GPU error dump. Signed-off-by: Jouni Högander --- .../drm/i915/display

[Intel-gfx] [RFC PATCH 3/4] drm/i915/display: Move enable_fbc module parameter under display

2023-10-04 Thread Jouni Högander
Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/i9xx_wm.c | 2 +- drivers/gpu/drm/i915/display/intel_display_params.c | 4 drivers/gpu/drm/i915/display/intel_display_params.h | 3 ++- drivers/gpu/drm/i915/display/intel_fbc.c| 10 +- drivers

[Intel-gfx] [RFC PATCH 4/4] drm/i915/display: Move psr related module parameters under display

2023-10-04 Thread Jouni Högander
Signed-off-by: Jouni Högander --- .../gpu/drm/i915/display/intel_display_params.c | 15 +++ .../gpu/drm/i915/display/intel_display_params.h | 3 +++ drivers/gpu/drm/i915/display/intel_psr.c | 14 +++--- drivers/gpu/drm/i915/i915_params.c| 15

[Intel-gfx] [PATCH 0/3] Move stolen memory handling details into i915_gem_stolen

2023-06-09 Thread Jouni Högander
We are preparing for Xe driver. Stolen memory handling will be different in Xe driver. Due to this we want to remove all stolen memory handling details away from FBC code. Cc: Jani Nikula Cc: Rodrigo Vivi Cc: Ville Syrjälä Cc: Maarten Lankhorst Jouni Högander (3): drm/i915: Move stolen

[Intel-gfx] [PATCH 1/3] drm/i915: Move stolen memory handling into i915_gem_stolen

2023-06-09 Thread Jouni Högander
for both i915 and Xe. Signed-off-by: Jouni Högander Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/display/intel_fbc.c | 46 +++--- drivers/gpu/drm/i915/gem/i915_gem_stolen.c | 37 + drivers/gpu/drm/i915/gem/i915_gem_stolen.h | 13 ++ 3 files

[Intel-gfx] [PATCH 2/3] drm/i915/fbc: Make FBC check stolen at use time

2023-06-09 Thread Jouni Högander
form the check in use-time. This also gives us benefit fbc_no_reason reporting missing initialization being reason for disabled fbc. Signed-off-by: Jouni Högander Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/display/intel_fbc.c | 8 +--- 1 file changed, 5 insertions(+), 3 d

  1   2   3   4   5   6   7   8   9   10   >