From nobody Sat Oct 11 04:07:45 2025 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7084F223DDF for ; Thu, 12 Jun 2025 08:14:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749716072; cv=none; b=kVyOWCOYeUByWhY5GBc9ql7jyuthZEPaPgRGBhorHPrwvfscM618GY5hWY9Uk84tCA+0rZ4tjGy8vTxwqCrGQ/ZD0LrB8yS+u4CIDiva6e/9IKVIhCcn9f5r9e7lNgFT5cfBQEXRIJVS1pHgqsuOCLLIbRQgy0cE7sI8Yn7HYIk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749716072; c=relaxed/simple; bh=J106FO0fiVsdh9zXFS0LOxsLt2GsSFvwk862Ry5I9ok=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=TYeNLFYjXrLsCkDgPoEOySKGncXdb1QfC+WOgcTu35N62DSfmqdspnzkL0xCskYF/3Kz0Jms1PGyMBpkWfzpwVYUC8MxooqR08pX4p+zIwkbn6XGdO8MOLQlTHyTibVS3Y3sBHi6+3vSVd6oLZ4UStgnwnvbrnlh52kgoPCZONk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=BPKlj26J; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="BPKlj26J" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1749716069; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FTTN7phXKaXaCmL5oHxlSPISQmHyCcHScf0EMG0hRFc=; b=BPKlj26JmcWXyCj9UXEUfsIUmld9OAx8mCKzT2bKusWEqWbXVvF30Pqq+XzjWV724mgjuo zVqpvxTU0xMtSAI6OLhm+QowPr/sjrJ1OGoqjiufHXAISsHS69IrOwx+RCWulaTmMz1Ffg zlVjfbVwRLa/+XoAd3VgXQa52QbZbZg= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-675-BfSl1CVDMZSmkIq_NCNj3w-1; Thu, 12 Jun 2025 04:14:27 -0400 X-MC-Unique: BfSl1CVDMZSmkIq_NCNj3w-1 X-Mimecast-MFC-AGG-ID: BfSl1CVDMZSmkIq_NCNj3w_1749716065 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 5FB1119560A6; Thu, 12 Jun 2025 08:14:25 +0000 (UTC) Received: from hydra.redhat.com (unknown [10.45.225.28]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id E51C319560A3; Thu, 12 Jun 2025 08:14:19 +0000 (UTC) From: Jocelyn Falempe To: Jani Nikula , Rodrigo Vivi , Joonas Lahtinen , Tvrtko Ursulin , =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= , David Airlie , Simona Vetter , Christian Koenig , Huang Rui , Matthew Auld , Matthew Brost , Maxime Ripard , Thomas Zimmermann , intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: Jocelyn Falempe Subject: [PATCH v9 3/9] drm/i915/display: Add a disable_tiling() for skl planes Date: Thu, 12 Jun 2025 10:01:00 +0200 Message-ID: <20250612081344.225200-4-jfalempe@redhat.com> In-Reply-To: <20250612081344.225200-1-jfalempe@redhat.com> References: <20250612081344.225200-1-jfalempe@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 drm_panic draws in linear framebuffer, so it's easier to re-use the current framebuffer, and disable tiling in the panic handler, to show the panic screen. This assumes that the alignment restriction is always smaller in linear than in tiled. It also assumes that the linear framebuffer size is always smaller than the tiled. Signed-off-by: Jocelyn Falempe --- v7: * Reword commit message about alignment/size when disabling tiling (Ville = Syrj=C3=A4l=C3=A4) .../drm/i915/display/skl_universal_plane.c | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/drivers/gpu/drm/i915/display/skl_universal_plane.c b/drivers/g= pu/drm/i915/display/skl_universal_plane.c index c7b336359a5e..ffcf50443c0c 100644 --- a/drivers/gpu/drm/i915/display/skl_universal_plane.c +++ b/drivers/gpu/drm/i915/display/skl_universal_plane.c @@ -2791,6 +2791,25 @@ static u8 tgl_plane_caps(struct intel_display *displ= ay, return caps; } =20 +static void skl_disable_tiling(struct intel_plane *plane) +{ + struct intel_plane_state *state =3D to_intel_plane_state(plane->base.stat= e); + struct intel_display *display =3D to_intel_display(plane); + u32 stride =3D state->view.color_plane[0].scanout_stride / 64; + u32 plane_ctl; + + plane_ctl =3D intel_de_read(display, PLANE_CTL(plane->pipe, plane->id)); + plane_ctl &=3D ~PLANE_CTL_TILED_MASK; + + intel_de_write_fw(display, PLANE_STRIDE(plane->pipe, plane->id), + PLANE_STRIDE_(stride)); + + intel_de_write_fw(display, PLANE_CTL(plane->pipe, plane->id), plane_ctl); + + intel_de_write_fw(display, PLANE_SURF(plane->pipe, plane->id), + skl_plane_surf(state, 0)); +} + struct intel_plane * skl_universal_plane_create(struct intel_display *display, enum pipe pipe, enum plane_id plane_id) @@ -2837,6 +2856,7 @@ skl_universal_plane_create(struct intel_display *disp= lay, plane->max_height =3D skl_plane_max_height; plane->min_cdclk =3D skl_plane_min_cdclk; } + plane->disable_tiling =3D skl_disable_tiling; =20 if (DISPLAY_VER(display) >=3D 13) plane->max_stride =3D adl_plane_max_stride; --=20 2.49.0