Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Souza, Jose" <jose.souza@intel.com>
To: "maarten.lankhorst@linux.intel.com"
	<maarten.lankhorst@linux.intel.com>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>
Subject: Re: [Intel-gfx] [PATCH 1/2] drm/i915: Swap ggtt_vma during legacy cursor update
Date: Fri, 23 Jun 2023 22:38:43 +0000	[thread overview]
Message-ID: <8ad44c98e60e7e553a05c4bead15446feaba6088.camel@intel.com> (raw)
In-Reply-To: <20230621114827.167713-1-maarten.lankhorst@linux.intel.com>

On Wed, 2023-06-21 at 13:48 +0200, Maarten Lankhorst wrote:
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_cursor.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_cursor.c b/drivers/gpu/drm/i915/display/intel_cursor.c
> index 4962247911d41..6f34098ea314d 100644
> --- a/drivers/gpu/drm/i915/display/intel_cursor.c
> +++ b/drivers/gpu/drm/i915/display/intel_cursor.c
> @@ -688,9 +688,8 @@ intel_legacy_cursor_update(struct drm_plane *_plane,
>  	if (ret)
>  		goto out_free;
>  
> -	ret = intel_plane_pin_fb(new_plane_state);
> -	if (ret)
> -		goto out_free;
> +	/* magic trick! */
> +	swap(new_plane_state->ggtt_vma, old_plane_state->ggtt_vma);
>  
>  	intel_frontbuffer_flush(to_intel_frontbuffer(new_plane_state->hw.fb),
>  				ORIGIN_CURSOR_UPDATE);

Getting a opps with this. This is missing the unbind block(https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/282#note_1947355):

[  219.866996] [drm:drm_helper_probe_single_connector_modes [drm_kms_helper]] [CONNECTOR:276:DP-4]
[  219.867005] xe 0000:03:00.0: [drm:intel_dp_detect [xe]] [CONNECTOR:276:DP-4]
[  219.867053] [drm:drm_helper_probe_single_connector_modes [drm_kms_helper]] [CONNECTOR:276:DP-4] disconnected
[  219.867073] [drm:drm_helper_probe_single_connector_modes [drm_kms_helper]] [CONNECTOR:284:HDMI-A-3]
[  219.867082] xe 0000:03:00.0: [drm:intel_hdmi_detect [xe]] [CONNECTOR:284:HDMI-A-3]
[  219.867127] [drm:drm_helper_probe_single_connector_modes [drm_kms_helper]] [CONNECTOR:284:HDMI-A-3] disconnected
[  222.635935] BUG: kernel NULL pointer dereference, address: 0000000000000000
[  222.642930] #PF: supervisor read access in kernel mode
[  222.648081] #PF: error_code(0x0000) - not-present page
[  222.653229] PGD 0 P4D 0
[  222.655778] Oops: 0000 [#1] PREEMPT SMP NOPTI
[  222.660147] CPU: 0 PID: 3049 Comm: InputThread Not tainted 6.3.0+zeh-xe+ #1023
[  222.667378] Hardware name: Intel Corporation Alder Lake Client Platform/AlderLake-S ADP-S DDR4 UDIMM CRB, BIOS ADLSFWI1.R00.3385.A00.2209161457
09/16/2022
[  222.681196] RIP: 0010:__xe_unpin_fb_vma+0x4/0x190 [xe]
[  222.686404] Code: 00 00 e9 65 ff ff ff e8 ea 56 9e e1 66 2e 0f 1f 84 00 00 00 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 41 54 55 53
<48> 8b 07 48 89 fb 48 8b 6b 08 48 8b 50 08 48 8b ba e8 22 00 00 48
[  222.705163] RSP: 0018:ffffc9000350fb50 EFLAGS: 00010206
[  222.710398] RAX: 0000000000000000 RBX: ffff88821f3a4c00 RCX: 0000000000000040
[  222.717544] RDX: 0000000000000000 RSI: ffffffff8253a99b RDI: 0000000000000000
[  222.724691] RBP: ffff888142dda800 R08: 0000000000000001 R09: 0000000000000001
[  222.731833] R10: 0000000000000007 R11: 0000000000000003 R12: ffff88811b5fa000
[  222.738979] R13: 0000000000000000 R14: 0000000001000000 R15: ffff88821f3a4c00
[  222.746125] FS:  00007fd3e4a4f640(0000) GS:ffff88849e600000(0000) knlGS:0000000000000000
[  222.754221] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  222.759979] CR2: 0000000000000000 CR3: 000000011c300006 CR4: 0000000000770ef0
[  222.767125] PKRU: 55555554
[  222.769847] Call Trace:
[  222.772311]  <TASK>
[  222.774426]  intel_plane_unpin_fb+0x10/0x30 [xe]
[  222.779105]  intel_legacy_cursor_update+0x2fc/0x3d0 [xe]
[  222.784481]  drm_mode_cursor_universal+0x126/0x240
[  222.789286]  drm_mode_cursor_common+0xfc/0x230
[  222.793746]  ? __pfx_drm_mode_cursor_ioctl+0x10/0x10
[  222.798723]  drm_mode_cursor_ioctl+0x46/0x70
[  222.803010]  drm_ioctl_kernel+0xc0/0x170
[  222.806947]  drm_ioctl+0x212/0x470
[  222.810366]  ? __pfx_drm_mode_cursor_ioctl+0x10/0x10
[  222.815341]  __x64_sys_ioctl+0x8a/0xb0
[  222.819104]  do_syscall_64+0x38/0x90
[  222.822700]  entry_SYSCALL_64_after_hwframe+0x72/0xdc
[  222.827769] RIP: 0033:0x7fd3f831aaff
[  222.831364] Code: 00 48 89 44 24 18 31 c0 48 8d 44 24 60 c7 04 24 10 00 00 00 48 89 44 24 08 48 8d 44 24 20 48 89 44 24 10 b8 10 00 00 00 0f 05
<41> 89 c0 3d 00 f0 ff ff 77 1f 48 8b 44 24 18 64 48 2b 04 25 28 00
[  222.850121] RSP: 002b:00007fd3e4a4d1e0 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
[  222.857701] RAX: ffffffffffffffda RBX: 00007fd3e4a4d270 RCX: 00007fd3f831aaff
[  222.864847] RDX: 00007fd3e4a4d270 RSI: 00000000c01c64a3 RDI: 000000000000000e
[  222.871991] RBP: 00000000c01c64a3 R08: 0000000000000710 R09: 0000000000000001
[  222.879137] R10: 0000000000000004 R11: 0000000000000246 R12: 00005639c66aef90
[  222.886283] R13: 000000000000000e R14: 0000000000000150 R15: 0000000000000150
[  222.893430]  </TASK>
[  222.895635] Modules linked in: snd_hda_codec_hdmi xe drm_ttm_helper gpu_sched drm_suballoc_helper i2c_algo_bit drm_buddy ttm drm_display_helper
drm_kms_helper syscopyarea sysfillrect sysimgblt mei_hdcp mei_pxp pmt_telemetry pmt_class snd_hda_codec_realtek x86_pkg_temp_thermal
snd_hda_codec_generic ledtrig_audio coretemp crct10dif_pclmul crc32_pclmul ghash_clmulni_intel kvm_intel snd_hda_intel snd_intel_dspcfg snd_hda_codec
snd_hwdep snd_hda_core e1000e i2c_i801 ptp snd_pcm i2c_smbus pps_core wmi_bmof mei_me mei intel_vsec video wmi pinctrl_alderlake fuse
[  222.944655] CR2: 0000000000000000
[  222.947984] ---[ end trace 0000000000000000 ]---
[  223.009508] RIP: 0010:__xe_unpin_fb_vma+0x4/0x190 [xe]
[  223.014713] Code: 00 00 e9 65 ff ff ff e8 ea 56 9e e1 66 2e 0f 1f 84 00 00 00 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 41 54 55 53
<48> 8b 07 48 89 fb 48 8b 6b 08 48 8b 50 08 48 8b ba e8 22 00 00 48
[  223.033470] RSP: 0018:ffffc9000350fb50 EFLAGS: 00010206
[  223.038705] RAX: 0000000000000000 RBX: ffff88821f3a4c00 RCX: 0000000000000040
[  223.045851] RDX: 0000000000000000 RSI: ffffffff8253a99b RDI: 0000000000000000
[  223.052996] RBP: ffff888142dda800 R08: 0000000000000001 R09: 0000000000000001
[  223.060142] R10: 0000000000000007 R11: 0000000000000003 R12: ffff88811b5fa000
[  223.067288] R13: 0000000000000000 R14: 0000000001000000 R15: ffff88821f3a4c00
[  223.074433] FS:  00007fd3e4a4f640(0000) GS:ffff88849e600000(0000) knlGS:0000000000000000
[  223.082529] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  223.088289] CR2: 0000000000000000 CR3: 000000011c300006 CR4: 0000000000770ef0
[  223.095437] PKRU: 55555554
[  223.098159] note: InputThread[3049] exited with irqs disabled


  parent reply	other threads:[~2023-06-23 22:38 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-21 11:48 [Intel-gfx] [PATCH 1/2] drm/i915: Swap ggtt_vma during legacy cursor update Maarten Lankhorst
2023-06-21 11:48 ` [Intel-gfx] [PATCH 2/2] drm/i915: Handle legacy cursor update as normal update Maarten Lankhorst
2023-06-21 11:50   ` [Intel-gfx] [PATCH] " Maarten Lankhorst
2023-06-22  6:41     ` Maarten Lankhorst
2023-06-21 23:09   ` [Intel-gfx] [PATCH 2/2] " kernel test robot
2023-06-21 23:40   ` kernel test robot
2023-06-21 20:49 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for series starting with [1/2] drm/i915: Swap ggtt_vma during legacy cursor update (rev2) Patchwork
2023-06-22  7:17 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/2] drm/i915: Swap ggtt_vma during legacy cursor update (rev3) Patchwork
2023-06-22  7:27 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-06-22 16:02 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2023-06-23 22:38 ` Souza, Jose [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-06-29 15:35 [Intel-gfx] [PATCH 1/2] drm/i915: Swap ggtt_vma during legacy cursor update Maarten Lankhorst
2023-07-25 20:26 ` Shankar, Uma
2023-08-10 12:41 Maarten Lankhorst
2023-08-14  6:50 Maarten Lankhorst

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8ad44c98e60e7e553a05c4bead15446feaba6088.camel@intel.com \
    --to=jose.souza@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=maarten.lankhorst@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox