From nobody Fri Dec 19 20:15:56 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 67BD92367BB for ; Fri, 25 Apr 2025 09:50:36 +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=1745574638; cv=none; b=gVLzTJdMuoIKUlZjJkGiJ+MQjoq6qQsczPKhv/5++zGes/EOvCNFcfBX4/nF5Jr3MH9VKbUuA+nzJearZPhRgteR9VgY///6XxBpDfABzQ26ypSmHLOAMqqKExRA/CZmJslmQN+tW5tDyXnN8UNRxZ4uaCScyzZbfqUIOzI1ny0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745574638; c=relaxed/simple; bh=pPTO5ptMcorF38dv6B4YF1ZwGUX9nPsx4cet3/AjJbw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=XxPXBUTG2JKDxEoJV+OSTCyWNAZWOW0sS3P7ykkEYRjHzSzEXXq4J93ckE2DjUFt6quIN/pamyFsNrEabEqCzXM5YOL6f82MDBD678erj1zTNA/Qao6kVlZN1AkqUEtgxUEYImTNW5UcF6QOkQlvaAG4WSQTBfRT2bB7OAOmIHY= 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=aWT6/hGf; 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="aWT6/hGf" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1745574635; 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=l4zfRamAANJi/R0hC8TGqDhodvx2sHMq+dzzXl8IRGw=; b=aWT6/hGf7ynx/1wBINstwzKk+ILeLWUHPve7xtFSEY5u0858tU82C/8eeF9HDiVzwHp3/e D+DpoF0SZLGPgNUWEM+MhjOsDZl3IkYvtB2Z5f3UGm0Gx7OtBFl6y0x3BH5g+10HQaXiez KACFzEQJGwIMZqx1ZW85xYnciaq3YDI= Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-435-J1cns0yvMNKVBJUuZBzSlQ-1; Fri, 25 Apr 2025 05:50:32 -0400 X-MC-Unique: J1cns0yvMNKVBJUuZBzSlQ-1 X-Mimecast-MFC-AGG-ID: J1cns0yvMNKVBJUuZBzSlQ_1745574630 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-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id B53B51800264; Fri, 25 Apr 2025 09:50:30 +0000 (UTC) Received: from hydra.redhat.com (unknown [10.44.34.172]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id BD20D195608D; Fri, 25 Apr 2025 09:50:26 +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 , 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 v7 3/8] drm/i915/display: Add a disable_tiling() for skl planes Date: Fri, 25 Apr 2025 11:37:49 +0200 Message-ID: <20250425094949.473060-4-jfalempe@redhat.com> In-Reply-To: <20250425094949.473060-1-jfalempe@redhat.com> References: <20250425094949.473060-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 8739195aba69..64a1e8e7122d 100644 --- a/drivers/gpu/drm/i915/display/skl_universal_plane.c +++ b/drivers/gpu/drm/i915/display/skl_universal_plane.c @@ -2790,6 +2790,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) @@ -2836,6 +2855,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