From patchwork Wed Jan 17 03:12:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Erico Nunes X-Patchwork-Id: 13521388 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BF91DC47DA7 for ; Wed, 17 Jan 2024 03:13:41 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7EC8C10E61E; Wed, 17 Jan 2024 03:13:27 +0000 (UTC) Received: from mail-ed1-f44.google.com (mail-ed1-f44.google.com [209.85.208.44]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1FDAC10E60A; Wed, 17 Jan 2024 03:13:21 +0000 (UTC) Received: by mail-ed1-f44.google.com with SMTP id 4fb4d7f45d1cf-559c6b833b0so912285a12.1; Tue, 16 Jan 2024 19:13:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705461140; x=1706065940; darn=lists.freedesktop.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=przBstviTKeMKG8hsGaQhziOmoZ/mS6n5cQDIFTsogA=; b=aLZEpVX8+VmRuiNmSbi9CNtoDdEW0h9+T8rDUSkVh/YcNDdEcdhCEnV2LNKb0+Wic6 /i6PMpF+U04jQk8ZYIMqSBMJUHWrP/2uiRtPVkz0S8QBXiQdhyueZR9CRttv6lfRuclG A6RdBgkHqCMOFAzyBie7F4lLRM7D/M58ZdlTFDC4UJFihPy7fmvmiMNykdAN+KUlHjUn uTuPc7d6N0vrRODRvPrQsvraOwiTSp+fqy9MiAT0M135CSnzrqvBuyl2UU4fJMWRQVdk jhyklziMijQhutXLD8bgBbh388trHOK5w1MALkIEPAFGEcyHDNX7BTZVAhDu9xVDLvEX k3vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705461140; x=1706065940; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=przBstviTKeMKG8hsGaQhziOmoZ/mS6n5cQDIFTsogA=; b=g3PonX7p5IAYnUDaCofS2um1sdbyg9BhCEYXRirbUdKgPGOTE7LWiwLjBbK1yQqOG6 ilniCu7HpXm9YXbGbznIDptyGVmNIojkJBtmhwgeIMrA3NnwhVryVoDQUf++eE1TPBb7 63sQ/vPIGvfHZl0skKhodiZMzX26wSIkHQCu3c/3H0MsbZ+odb/dVX3F3dl6n2d1UehS bl7Mwve7lVU1yRW2EmDZRyP/OnGhRwnG2Xlx8MyVG3BB1StcwVrN9CE07Q8VLuCyMzFD UP1/0SsATeZxx/HrlxnWBgM7mXe+J7hP/V2kZbmSzHMRf/56+MOSWwdapL96ittZnaiB iUNg== X-Gm-Message-State: AOJu0YwJxkhcb87lmPa91pdjcTceCn/20++2AE4MhMQcqpsUNBiAk1Yn URvZg2A9RgAzHchEDwa6yDU= X-Google-Smtp-Source: AGHT+IH4g37ccsIH+5nDtEbHrV7ecTiL8sxw2zhnvaeOkN2UzCLivl5+Qf3In+6yBdstgOn6oOKFFQ== X-Received: by 2002:a50:9fc8:0:b0:559:ba97:7219 with SMTP id c66-20020a509fc8000000b00559ba977219mr1010135edf.48.1705461139900; Tue, 16 Jan 2024 19:12:19 -0800 (PST) Received: from mosaic.enunes.eu (ip-78-45-66-209.bb.vodafone.cz. [78.45.66.209]) by smtp.gmail.com with ESMTPSA id n13-20020a05640204cd00b0055971af7a23sm2258418edw.95.2024.01.16.19.12.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jan 2024 19:12:19 -0800 (PST) From: Erico Nunes To: Qiang Yu , dri-devel@lists.freedesktop.org, lima@lists.freedesktop.org Subject: [PATCH v1 1/6] drm/lima: fix devfreq refcount imbalance for job timeouts Date: Wed, 17 Jan 2024 04:12:07 +0100 Message-ID: <20240117031212.1104034-2-nunes.erico@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240117031212.1104034-1-nunes.erico@gmail.com> References: <20240117031212.1104034-1-nunes.erico@gmail.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Zimmermann , linux-kernel@vger.kernel.org, Maxime Ripard , christian.koenig@amd.com, anarsoul@gmail.com, Daniel Vetter , David Airlie , Sumit Semwal , Erico Nunes Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" In case a task manages to complete but it took just long enough to also trigger the timeout handler, the current code results in a refcount imbalance on lima_pm_idle. While this can be a rare occurrence, when it happens it may fill user logs with stack traces such as: [10136.669170] WARNING: CPU: 0 PID: 0 at drivers/gpu/drm/lima/lima_devfreq.c:205 lima_devfreq_record_idle+0xa0/0xb0 ... [10136.669459] pc : lima_devfreq_record_idle+0xa0/0xb0 ... [10136.669628] Call trace: [10136.669634] lima_devfreq_record_idle+0xa0/0xb0 [10136.669646] lima_sched_pipe_task_done+0x5c/0xb0 [10136.669656] lima_gp_irq_handler+0xa8/0x120 [10136.669666] __handle_irq_event_percpu+0x48/0x160 [10136.669679] handle_irq_event+0x4c/0xc0 The imbalance happens because lima_sched_pipe_task_done() already calls lima_pm_idle for this case if there was no error. Check the error flag in the timeout handler to ensure we can never run into this case. Signed-off-by: Erico Nunes Reviewed-by: Vasily Khoruzhick --- drivers/gpu/drm/lima/lima_sched.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/lima/lima_sched.c b/drivers/gpu/drm/lima/lima_sched.c index c3bf8cda8498..66317296d831 100644 --- a/drivers/gpu/drm/lima/lima_sched.c +++ b/drivers/gpu/drm/lima/lima_sched.c @@ -427,7 +427,8 @@ static enum drm_gpu_sched_stat lima_sched_timedout_job(struct drm_sched_job *job pipe->current_vm = NULL; pipe->current_task = NULL; - lima_pm_idle(ldev); + if (pipe->error) + lima_pm_idle(ldev); drm_sched_resubmit_jobs(&pipe->base); drm_sched_start(&pipe->base, true); From patchwork Wed Jan 17 03:12:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Erico Nunes X-Patchwork-Id: 13521392 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9A424C47077 for ; Wed, 17 Jan 2024 03:13:52 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 91D2E10E629; Wed, 17 Jan 2024 03:13:32 +0000 (UTC) Received: from mail-ed1-f42.google.com (mail-ed1-f42.google.com [209.85.208.42]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2CDCD10E613; Wed, 17 Jan 2024 03:13:22 +0000 (UTC) Received: by mail-ed1-f42.google.com with SMTP id 4fb4d7f45d1cf-5571e662b93so8719950a12.2; Tue, 16 Jan 2024 19:13:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705461141; x=1706065941; darn=lists.freedesktop.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=WgEOXnBwtjV0DRgAs0TONH+yAncBHjvW7O8dDZAmbmY=; b=kUCtG8WEoxI17DlM1YzAZ/cN8FaKx5Gq1FI4sb/yT8oyo16EDs/jEHstjHVvbAyN3b tbCiPztVkW8SeQKdqqyWL/oE85oLnvJmP5wWGWgoT+fuY6ksP+d08FjY24pmdKprZM9+ 4QrKPvk/r+0ce4dPIMFy39jxeFNiSPLbK3xBJitpPRy6zTmlQTu60g9tL0HDQZgEvkJd Xm2GxgD7auFXfzdGtSsg7wKyr4IVPxJECt5KIYBfcokXtlHG3rAZgQDgzxpEuXcf0s25 3sfgZRfGt0Gm+p+Qu0Suog46/lsrI4uEpEJOor8xfOvhfYvbr9kG925bQ83uSNJ7aXj+ 2T9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705461141; x=1706065941; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WgEOXnBwtjV0DRgAs0TONH+yAncBHjvW7O8dDZAmbmY=; b=f/30HH8h+FcekcKdIldi6Zp6P5asZbK6A8h1v8lV7Ct3pGUcPl2kMfa3Ab1aC3YwYu VTVpgvvyAXJ9KAjdjpb07J9gTyuMYeU8cpwGsgmrTgUTmMeXDRmC3AYmyHI95R5JVExd AYnnhbk5Alv91uobbeb8CcxeWFu1VKlD7cAmBWvSZKSZ0EfcgI0NL0O/dHr2uAR6jTgA ELKAz2CHggEJOXszuwBfP1FaBsq51jsKHnSAHrCqJpf3bLaN/4TXH5/JhqZg0K0qOtdE TywpXrlA+2GI+6DX5lwb9jNcM2nzgznfywnCEHNq4mIRxy20M3kdGvzo/tGP3MMwhk3k odPQ== X-Gm-Message-State: AOJu0Yxy/abAGtHnNLdbTlyjmC94KY5uUgmy64E3pReVWFiwWPxex6zu k0SuhfDmskPuTm5Up0vaCMw= X-Google-Smtp-Source: AGHT+IFbr8FIXBAVFLQAm0BnJme9prl4lYGU0GNZbLVZDPfrnNKHuH2dSlYobzkRpW1IT5DgI99FTA== X-Received: by 2002:aa7:d389:0:b0:558:9126:5673 with SMTP id x9-20020aa7d389000000b0055891265673mr4261820edq.39.1705461140983; Tue, 16 Jan 2024 19:12:20 -0800 (PST) Received: from mosaic.enunes.eu (ip-78-45-66-209.bb.vodafone.cz. [78.45.66.209]) by smtp.gmail.com with ESMTPSA id n13-20020a05640204cd00b0055971af7a23sm2258418edw.95.2024.01.16.19.12.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jan 2024 19:12:20 -0800 (PST) From: Erico Nunes To: Qiang Yu , dri-devel@lists.freedesktop.org, lima@lists.freedesktop.org Subject: [PATCH v1 2/6] drm/lima: reset async_reset on pp hard reset Date: Wed, 17 Jan 2024 04:12:08 +0100 Message-ID: <20240117031212.1104034-3-nunes.erico@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240117031212.1104034-1-nunes.erico@gmail.com> References: <20240117031212.1104034-1-nunes.erico@gmail.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Zimmermann , linux-kernel@vger.kernel.org, Maxime Ripard , christian.koenig@amd.com, anarsoul@gmail.com, Daniel Vetter , David Airlie , Sumit Semwal , Erico Nunes Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Lima pp jobs use an async reset to avoid having to wait for the soft reset right after a job. The soft reset is done at the end of a job and a reset_complete flag is expected to be set at the next job. However, in case the user runs into a job timeout from any application, a hard reset is issued to the hardware. This hard reset clears the reset_complete flag, which causes an error message to show up before the next job. This is probably harmless for the execution but can be very confusing to debug, as it blames a reset timeout on the next application to submit a job. Reset the async_reset flag when doing the hard reset so that we don't get that message. Signed-off-by: Erico Nunes Reviewed-by: Vasily Khoruzhick --- drivers/gpu/drm/lima/lima_pp.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/lima/lima_pp.c b/drivers/gpu/drm/lima/lima_pp.c index a5c95bed08c0..a8f8f63b8295 100644 --- a/drivers/gpu/drm/lima/lima_pp.c +++ b/drivers/gpu/drm/lima/lima_pp.c @@ -191,6 +191,13 @@ static int lima_pp_hard_reset(struct lima_ip *ip) pp_write(LIMA_PP_PERF_CNT_0_LIMIT, 0); pp_write(LIMA_PP_INT_CLEAR, LIMA_PP_IRQ_MASK_ALL); pp_write(LIMA_PP_INT_MASK, LIMA_PP_IRQ_MASK_USED); + + /* + * if there was an async soft reset queued, + * don't wait for it in the next job + */ + ip->data.async_reset = false; + return 0; } From patchwork Wed Jan 17 03:12:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Erico Nunes X-Patchwork-Id: 13521389 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F4000C47077 for ; Wed, 17 Jan 2024 03:13:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8D11D10E621; Wed, 17 Jan 2024 03:13:27 +0000 (UTC) Received: from mail-lj1-f174.google.com (mail-lj1-f174.google.com [209.85.208.174]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2851010E611; Wed, 17 Jan 2024 03:13:23 +0000 (UTC) Received: by mail-lj1-f174.google.com with SMTP id 38308e7fff4ca-2cd1a1c5addso123126131fa.1; Tue, 16 Jan 2024 19:13:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705461142; x=1706065942; darn=lists.freedesktop.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ADVa6dhhX6uOMOvbI9YDxuD3rJvLmpM0F1zxHrfGnwk=; b=XaHI80N1+vEgDyxf8F9OFyAHBr9PSG94733qnnTxwoYvvIqHNn9xj+qjZ0phNxBKv1 wurw3rsewLRMqxFTQmq9sQPV86m4xst1TruXuYHFIcsUfYFSBlkQrkeBfK9kvd0sgPvu wTld2LtkqPhvU8NJSerbx2YdAid8X4MmEW6VeysZrmrhtWZh5+0CMqMXyF0rcEDMgtet gqTq+lOZ1pmeQeacMbK7ayUC3PbAgBR0LxSaiJMd/GqJ0qtLyoEde/F4m4g++vsWE1OA gR8XBiMw3nMvh7eewM6KDSg9mxrV6dieKo5VqksmHiSyEGHrkgzjfWh/OEol5FUnFG0y WD/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705461142; x=1706065942; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ADVa6dhhX6uOMOvbI9YDxuD3rJvLmpM0F1zxHrfGnwk=; b=V37Mp50rwTcgTPXIz1VeYnfJ8F8GhjF9BYl55SmBZV8OF63/SNBZ+RKh5aMbAZPdaM W82mjwluY7cPV2GCrf4QEVZCn5T6MmluizLzb+P7xMkIHJueXJD6nVOrlt/6v3L4uttk nt+ia4UT/jAcrHTpRmz0IJDPhUF2KdbWsHc53fjH+6rleXpM2RKn7jcJu9QS9JUj9NfP ScsjK80DPUHfJU7mgU1STNhSpx9cO+3hl7sCBf/SP6dUNOgMXmjYdc/KXBvzHHS2gGFg 6nUghBo35WYxuAW2UX0Sc+vWcA5ycsITiZJ0SPwPmxjtTpxhfjN0vtaxIblI92Rm4Jb6 LPhA== X-Gm-Message-State: AOJu0Yx20iPOBN9CvAtDTdLgTqP/xqgzw6SYyjLUoNqImKA5qqy9RZn0 c1WkDebGeIjJIZDpQTJHPOs= X-Google-Smtp-Source: AGHT+IGCAEkQUMLR8zU3CI9B7qiwHLI4EvlgyFIpxwO2sNzIS13NtZgB6xC9DpCIDhBUMxK9jw7ADQ== X-Received: by 2002:a2e:3a12:0:b0:2cd:fea:65bd with SMTP id h18-20020a2e3a12000000b002cd0fea65bdmr3776646lja.28.1705461142008; Tue, 16 Jan 2024 19:12:22 -0800 (PST) Received: from mosaic.enunes.eu (ip-78-45-66-209.bb.vodafone.cz. [78.45.66.209]) by smtp.gmail.com with ESMTPSA id n13-20020a05640204cd00b0055971af7a23sm2258418edw.95.2024.01.16.19.12.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jan 2024 19:12:21 -0800 (PST) From: Erico Nunes To: Qiang Yu , dri-devel@lists.freedesktop.org, lima@lists.freedesktop.org Subject: [PATCH v1 3/6] drm/lima: set bus_stop bit before hard reset Date: Wed, 17 Jan 2024 04:12:09 +0100 Message-ID: <20240117031212.1104034-4-nunes.erico@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240117031212.1104034-1-nunes.erico@gmail.com> References: <20240117031212.1104034-1-nunes.erico@gmail.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Zimmermann , linux-kernel@vger.kernel.org, Maxime Ripard , christian.koenig@amd.com, anarsoul@gmail.com, Daniel Vetter , David Airlie , Sumit Semwal , Erico Nunes Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This is required for reliable hard resets. Otherwise, doing a hard reset while a task is still running (such as a task which is being stopped by the drm_sched timeout handler) may result in random mmu write timeouts or lockups which cause the entire gpu to hang. Signed-off-by: Erico Nunes Reviewed-by: Vasily Khoruzhick --- drivers/gpu/drm/lima/lima_pp.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/gpu/drm/lima/lima_pp.c b/drivers/gpu/drm/lima/lima_pp.c index a8f8f63b8295..ac097dd75072 100644 --- a/drivers/gpu/drm/lima/lima_pp.c +++ b/drivers/gpu/drm/lima/lima_pp.c @@ -168,6 +168,11 @@ static void lima_pp_write_frame(struct lima_ip *ip, u32 *frame, u32 *wb) } } +static int lima_pp_bus_stop_poll(struct lima_ip *ip) +{ + return !!(pp_read(LIMA_PP_STATUS) & LIMA_PP_STATUS_BUS_STOPPED); +} + static int lima_pp_hard_reset_poll(struct lima_ip *ip) { pp_write(LIMA_PP_PERF_CNT_0_LIMIT, 0xC01A0000); @@ -181,6 +186,14 @@ static int lima_pp_hard_reset(struct lima_ip *ip) pp_write(LIMA_PP_PERF_CNT_0_LIMIT, 0xC0FFE000); pp_write(LIMA_PP_INT_MASK, 0); + + pp_write(LIMA_PP_CTRL, LIMA_PP_CTRL_STOP_BUS); + ret = lima_poll_timeout(ip, lima_pp_bus_stop_poll, 10, 100); + if (ret) { + dev_err(dev->dev, "pp %s bus stop timeout\n", lima_ip_name(ip)); + return ret; + } + pp_write(LIMA_PP_CTRL, LIMA_PP_CTRL_FORCE_RESET); ret = lima_poll_timeout(ip, lima_pp_hard_reset_poll, 10, 100); if (ret) { From patchwork Wed Jan 17 03:12:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Erico Nunes X-Patchwork-Id: 13521387 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A2094C47DA7 for ; Wed, 17 Jan 2024 03:13:37 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 68EBB10E612; Wed, 17 Jan 2024 03:13:27 +0000 (UTC) Received: from mail-lj1-f171.google.com (mail-lj1-f171.google.com [209.85.208.171]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2462F10E60C; Wed, 17 Jan 2024 03:13:24 +0000 (UTC) Received: by mail-lj1-f171.google.com with SMTP id 38308e7fff4ca-2cd1232a2c7so131424131fa.0; Tue, 16 Jan 2024 19:13:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705461143; x=1706065943; darn=lists.freedesktop.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=9wbzi3EnFlPT7VHx8X0cPGf7wGavBuju6JI8nYElqQU=; b=UUYFuQl1cb9nn4bmVa0QlBbh8NBl7Ms/MEG4WzH9TsvWY/l6nQUbyOud+LyiGQCss1 +5uVsHllTtAUu1AjEXxuGVchr9IbPOWFv0YjM1YYL2GLmHOeVhfu59Erz+mJnLzonLbb XtA+NsCZTawZiPAi1XupcS5uzhHHmumXuyGytCKklFj6zvAF4+vLKf/EotlN3QpAbLdH J5gryyBPEdhfC0att8+Bh0q9sjCO6rXOKBgQwcEmHje4NEs1Ddns98SdY7/yDBRGTO/h TF8uXO4VtTc9eIxOWMKogTmXbdSJZaiHncL2kcoHxxa8TVo8s1LLS1dyQ8ISlx6KOFVH blTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705461143; x=1706065943; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9wbzi3EnFlPT7VHx8X0cPGf7wGavBuju6JI8nYElqQU=; b=Ea/a7iiEOEuRtgq5osAIoIe74u02ssWhmXnR+avQYYYrp9GddOTzs3lTabrZnDRW9t o42hVlnCR7Qe5n8X7tVNMtQHhvk4aMU24oL8sk0bLVaCFIqErBJnBOKsxr/QMgYkvroy wDjhNi3hHfjpoir4VIspm1jgyDH24W7YY1yEEw23/xZugggw363TwtncHoZhiKKK/Qti 08EaI3Uog1MLBS4p0VaZm3pVwrB0tEnq8BEz6bJFytKyFbakdLZ95+R+sWndpZd44SKa JwTtEoNZsOfRlNEMzsklJkkg015bGCSF0+JDFrP0kbEtKXWH5L6mO96v5DrzGZg4DKGf sRyw== X-Gm-Message-State: AOJu0YzOI/NLb6EPf7GJocIf+FKrVjURyj4i+/XrtLcW9xsEeekFVU8M JbfOwQOtrLXbuiUCdB3W9XA= X-Google-Smtp-Source: AGHT+IELPdudRcRB5rbBm58TIPpk4jrqXQSMiUsaBUYpCfikolg1o0C7SeNXHZ8nFtI+R+1PiVTd0g== X-Received: by 2002:a2e:978a:0:b0:2cd:2838:78d with SMTP id y10-20020a2e978a000000b002cd2838078dmr3639516lji.63.1705461143092; Tue, 16 Jan 2024 19:12:23 -0800 (PST) Received: from mosaic.enunes.eu (ip-78-45-66-209.bb.vodafone.cz. [78.45.66.209]) by smtp.gmail.com with ESMTPSA id n13-20020a05640204cd00b0055971af7a23sm2258418edw.95.2024.01.16.19.12.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jan 2024 19:12:22 -0800 (PST) From: Erico Nunes To: Qiang Yu , dri-devel@lists.freedesktop.org, lima@lists.freedesktop.org Subject: [PATCH v1 4/6] drm/lima: handle spurious timeouts due to high irq latency Date: Wed, 17 Jan 2024 04:12:10 +0100 Message-ID: <20240117031212.1104034-5-nunes.erico@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240117031212.1104034-1-nunes.erico@gmail.com> References: <20240117031212.1104034-1-nunes.erico@gmail.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Zimmermann , linux-kernel@vger.kernel.org, Maxime Ripard , christian.koenig@amd.com, anarsoul@gmail.com, Daniel Vetter , David Airlie , Sumit Semwal , Erico Nunes Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" There are several unexplained and unreproduced cases of rendering timeouts with lima, for which one theory is high IRQ latency coming from somewhere else in the system. This kind of occurrence may cause applications to trigger unnecessary resets of the GPU or even applications to hang if it hits an issue in the recovery path. Panfrost already does some special handling to account for such "spurious timeouts", it makes sense to have this in lima too to reduce the chance that it hit users. Signed-off-by: Erico Nunes Reviewed-by: Vasily Khoruzhick --- drivers/gpu/drm/lima/lima_sched.c | 32 ++++++++++++++++++++++++++----- drivers/gpu/drm/lima/lima_sched.h | 2 ++ 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/lima/lima_sched.c b/drivers/gpu/drm/lima/lima_sched.c index 66317296d831..9449b81bcd5b 100644 --- a/drivers/gpu/drm/lima/lima_sched.c +++ b/drivers/gpu/drm/lima/lima_sched.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 OR MIT /* Copyright 2017-2019 Qiang Yu */ +#include #include #include #include @@ -223,10 +224,7 @@ static struct dma_fence *lima_sched_run_job(struct drm_sched_job *job) task->fence = &fence->base; - /* for caller usage of the fence, otherwise irq handler - * may consume the fence before caller use it - */ - dma_fence_get(task->fence); + task->done_fence = dma_fence_get(task->fence); pipe->current_task = task; @@ -401,9 +399,33 @@ static enum drm_gpu_sched_stat lima_sched_timedout_job(struct drm_sched_job *job struct lima_sched_pipe *pipe = to_lima_pipe(job->sched); struct lima_sched_task *task = to_lima_task(job); struct lima_device *ldev = pipe->ldev; + struct lima_ip *ip = pipe->processor[0]; + + /* + * If the GPU managed to complete this jobs fence, the timeout is + * spurious. Bail out. + */ + if (dma_fence_is_signaled(task->done_fence)) { + DRM_WARN("%s spurious timeout\n", lima_ip_name(ip)); + return DRM_GPU_SCHED_STAT_NOMINAL; + } + + /* + * Lima IRQ handler may take a long time to process an interrupt + * if there is another IRQ handler hogging the processing. + * In order to catch such cases and not report spurious Lima job + * timeouts, synchronize the IRQ handler and re-check the fence + * status. + */ + synchronize_irq(ip->irq); + + if (dma_fence_is_signaled(task->done_fence)) { + DRM_WARN("%s unexpectedly high interrupt latency\n", lima_ip_name(ip)); + return DRM_GPU_SCHED_STAT_NOMINAL; + } if (!pipe->error) - DRM_ERROR("lima job timeout\n"); + DRM_ERROR("%s lima job timeout\n", lima_ip_name(ip)); drm_sched_stop(&pipe->base, &task->base); diff --git a/drivers/gpu/drm/lima/lima_sched.h b/drivers/gpu/drm/lima/lima_sched.h index 6a11764d87b3..34050facb110 100644 --- a/drivers/gpu/drm/lima/lima_sched.h +++ b/drivers/gpu/drm/lima/lima_sched.h @@ -29,6 +29,8 @@ struct lima_sched_task { bool recoverable; struct lima_bo *heap; + struct dma_fence *done_fence; + /* pipe fence */ struct dma_fence *fence; }; From patchwork Wed Jan 17 03:12:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Erico Nunes X-Patchwork-Id: 13521390 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E4677C47DA2 for ; Wed, 17 Jan 2024 03:13:47 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4196710E623; Wed, 17 Jan 2024 03:13:28 +0000 (UTC) Received: from mail-ed1-f53.google.com (mail-ed1-f53.google.com [209.85.208.53]) by gabe.freedesktop.org (Postfix) with ESMTPS id 289E010E612; Wed, 17 Jan 2024 03:13:25 +0000 (UTC) Received: by mail-ed1-f53.google.com with SMTP id 4fb4d7f45d1cf-5534dcfdd61so18622370a12.0; Tue, 16 Jan 2024 19:13:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705461144; x=1706065944; darn=lists.freedesktop.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=TurR4TSqa7pH4YQLivqIMoaxRqWtz6E/dts/c6GuzZE=; b=XbF8Nz9OTblTvyFKBDhL2/xsjEgZXqL2jalwSNso8KoBs8Lf8uRy4qNYSJ8cxQ8Zux 4SxDEBBqanenWNiMJyatYno9sTyjsAcEWwvz2uPFWCZU1zn8gA/5mfwS01rGTdwxWVkd vyvz8Md9TLzJ1QyxENjcTD07fXxSoVw85mEKbQJLmax475jWhh2qe8PWYl4qLXYvZ/yX wdFEqSQs1t9kwp4v6EG7AbvB7A+j+DyyGCg0KczKAMcfd44udPB99KFNH/8y4UQmBMf6 V0zPwCzcBGojhQhqpP3snSXU0WG/OCzcLY2svN0VByAc+LFoEOTrrpqsx5jciBRQh7A+ gD9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705461144; x=1706065944; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TurR4TSqa7pH4YQLivqIMoaxRqWtz6E/dts/c6GuzZE=; b=SDbSiFzygt2I+CFul4ayngKErzMGf1PBOxw1YPPvbUAHHICjXC3KzE8PLkImB/R7Cl wx6Zk1l0Eq8RzfPVEpwreaR+SeWSk+2U3OGEUPx0hpB2imLi4urn2pokIecpnrMuhwdk bmhnjGEXjsUiRCLDmKAg3+jA15k6wq+WbYnTtdv+lprr5QkrQx0lnclGaSj7GfhVcS4n 2tehfX9C4zQp+dgaTl6/wIGgCulCoQaxLe3n4i96Y2T5Xfel4cwHjd5b3dggZQa4ouHq TTsbBcVUtow+e/jc32Am+L6c0SAGC3nmidwLVPIIGTnYTLW1J4+4njeiVfzyjJTxBSIa ZKYQ== X-Gm-Message-State: AOJu0YzFyVKhNHtvlJaVr2o0ha5J+MQq0CDJ0aUeeB6zNJSSJT7l9vLJ /aM2kjWj24DqypFi5hAuyfo= X-Google-Smtp-Source: AGHT+IGetluui/FySPGgoTIPulAjmlBnWc8jvnBGs+ZlVHD0WYWX+lScQaqSVrFsrUDD1HER0F64yg== X-Received: by 2002:aa7:d84d:0:b0:558:308f:db04 with SMTP id f13-20020aa7d84d000000b00558308fdb04mr153546eds.18.1705461144164; Tue, 16 Jan 2024 19:12:24 -0800 (PST) Received: from mosaic.enunes.eu (ip-78-45-66-209.bb.vodafone.cz. [78.45.66.209]) by smtp.gmail.com with ESMTPSA id n13-20020a05640204cd00b0055971af7a23sm2258418edw.95.2024.01.16.19.12.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jan 2024 19:12:23 -0800 (PST) From: Erico Nunes To: Qiang Yu , dri-devel@lists.freedesktop.org, lima@lists.freedesktop.org Subject: [PATCH v1 5/6] drm/lima: remove guilty drm_sched context handling Date: Wed, 17 Jan 2024 04:12:11 +0100 Message-ID: <20240117031212.1104034-6-nunes.erico@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240117031212.1104034-1-nunes.erico@gmail.com> References: <20240117031212.1104034-1-nunes.erico@gmail.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Zimmermann , linux-kernel@vger.kernel.org, Maxime Ripard , christian.koenig@amd.com, anarsoul@gmail.com, Daniel Vetter , David Airlie , Sumit Semwal , Erico Nunes Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Marking the context as guilty currently only makes the application which hits a single timeout problem to stop its rendering context entirely. All jobs submitted later are dropped from the guilty context. Lima runs on fairly underpowered hardware for modern standards and it is not entirely unreasonable that a rendering job may time out occasionally due to high system load or too demanding application stack. In this case it would be generally preferred to report the error but try to keep the application going. Other similar embedded GPU drivers don't make use of the guilty context flag. Now that there are reliability improvements to the lima timeout recovery handling, drop the guilty contexts to let the application keep running in this case. Signed-off-by: Erico Nunes Reviewed-by: Vasily Khoruzhick --- drivers/gpu/drm/lima/lima_ctx.c | 2 +- drivers/gpu/drm/lima/lima_ctx.h | 1 - drivers/gpu/drm/lima/lima_sched.c | 5 ++--- drivers/gpu/drm/lima/lima_sched.h | 3 +-- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/lima/lima_ctx.c b/drivers/gpu/drm/lima/lima_ctx.c index 8389f2d7d021..0e668fc1e0f9 100644 --- a/drivers/gpu/drm/lima/lima_ctx.c +++ b/drivers/gpu/drm/lima/lima_ctx.c @@ -19,7 +19,7 @@ int lima_ctx_create(struct lima_device *dev, struct lima_ctx_mgr *mgr, u32 *id) kref_init(&ctx->refcnt); for (i = 0; i < lima_pipe_num; i++) { - err = lima_sched_context_init(dev->pipe + i, ctx->context + i, &ctx->guilty); + err = lima_sched_context_init(dev->pipe + i, ctx->context + i); if (err) goto err_out0; } diff --git a/drivers/gpu/drm/lima/lima_ctx.h b/drivers/gpu/drm/lima/lima_ctx.h index 74e2be09090f..5b1063ce968b 100644 --- a/drivers/gpu/drm/lima/lima_ctx.h +++ b/drivers/gpu/drm/lima/lima_ctx.h @@ -13,7 +13,6 @@ struct lima_ctx { struct kref refcnt; struct lima_device *dev; struct lima_sched_context context[lima_pipe_num]; - atomic_t guilty; /* debug info */ char pname[TASK_COMM_LEN]; diff --git a/drivers/gpu/drm/lima/lima_sched.c b/drivers/gpu/drm/lima/lima_sched.c index 9449b81bcd5b..496c79713fe8 100644 --- a/drivers/gpu/drm/lima/lima_sched.c +++ b/drivers/gpu/drm/lima/lima_sched.c @@ -154,13 +154,12 @@ void lima_sched_task_fini(struct lima_sched_task *task) } int lima_sched_context_init(struct lima_sched_pipe *pipe, - struct lima_sched_context *context, - atomic_t *guilty) + struct lima_sched_context *context) { struct drm_gpu_scheduler *sched = &pipe->base; return drm_sched_entity_init(&context->base, DRM_SCHED_PRIORITY_NORMAL, - &sched, 1, guilty); + &sched, 1, NULL); } void lima_sched_context_fini(struct lima_sched_pipe *pipe, diff --git a/drivers/gpu/drm/lima/lima_sched.h b/drivers/gpu/drm/lima/lima_sched.h index 34050facb110..677e908b53f8 100644 --- a/drivers/gpu/drm/lima/lima_sched.h +++ b/drivers/gpu/drm/lima/lima_sched.h @@ -93,8 +93,7 @@ int lima_sched_task_init(struct lima_sched_task *task, void lima_sched_task_fini(struct lima_sched_task *task); int lima_sched_context_init(struct lima_sched_pipe *pipe, - struct lima_sched_context *context, - atomic_t *guilty); + struct lima_sched_context *context); void lima_sched_context_fini(struct lima_sched_pipe *pipe, struct lima_sched_context *context); struct dma_fence *lima_sched_context_queue_task(struct lima_sched_task *task); From patchwork Wed Jan 17 03:12:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Erico Nunes X-Patchwork-Id: 13521391 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7CA85C47DA2 for ; Wed, 17 Jan 2024 03:13:50 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5CCA310E624; Wed, 17 Jan 2024 03:13:28 +0000 (UTC) Received: from mail-ed1-f45.google.com (mail-ed1-f45.google.com [209.85.208.45]) by gabe.freedesktop.org (Postfix) with ESMTPS id 992E810E604; Wed, 17 Jan 2024 03:13:26 +0000 (UTC) Received: by mail-ed1-f45.google.com with SMTP id 4fb4d7f45d1cf-557ad92cabbso10503169a12.0; Tue, 16 Jan 2024 19:13:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705461145; x=1706065945; darn=lists.freedesktop.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=dWLq4aGpb7f9s5ZfnYqz3MCWQjdIg4mIg649H1i2jNs=; b=blv3VvJd862kXpK5E171x21PfXRcDVevF6JisjLhLrCxDTlBhw8eL0hgjgd4EeGiHS x3VVTwsa1T2XhuoYALi/lpHxujYvIfTZtrhO5NpFIbnhZrKbhP5v7Nw1bhydPzM+PYwF vpUrSAOpi0Fx6TRR7cBr1tH/zNrxHBYBZfh90L1XYutNY0/jYgXu/eONub7CBWqJsRVR fLd8y8o0O6lSyB+IDOZuJi72BfnsSRqJ8+TYe0/ik+XSa9nY5zchEsHdU24rQ445cja9 3CG9c6MjTnWm5nlY8k9qrsg9ufBlfiqfyqsjgDgi0v/35idi566rZl3sw7seh/vM5I9R vn7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705461145; x=1706065945; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dWLq4aGpb7f9s5ZfnYqz3MCWQjdIg4mIg649H1i2jNs=; b=C0orAPerTsMsiX4oJFq5Adz4T0EpGQ/dnwO/HbICRXHWlntBC2bd5twullw/+1bsKv QcKtpBQpZZ1pASQ/NUTJtlq1E5OoZ7v6sjNu8YS8sQbcaXqUH2k5Hw7y5qYfuwsooKH5 pEAk8T/NE8rLgWjIO2oDo4IoX5xJ8srXZbVgdTGJSIHRK4TZIG2PU6G3J4SX41lasrKh sHDKgT3wG+IivDGlkS4cxdeenv+Wj0Hc8A0iKQNygUmFxqQSVQiqUOSyI9LENVv60w0X kge3QeLjVshFf2sMIWYSaRPZs4sXXs7gHd3VpH7u6winx3MiZnMTTuI/918Xots6x5/P Z2jQ== X-Gm-Message-State: AOJu0Yz6yNg9U1N8pJSp1Mmwfl9bMuySqJ99OTWbXfsC/z65+xGEXqSl c+q/6HWuNEByqzXEND6wEEk= X-Google-Smtp-Source: AGHT+IEmjP59OWSgsLUizwfI6NeAlYbd3r1WGISp0XSIEokfoWGm9jE1WbdrHhf6/lWKig7M+VYPKA== X-Received: by 2002:a05:6402:74e:b0:559:b3fe:5cbf with SMTP id p14-20020a056402074e00b00559b3fe5cbfmr433485edy.7.1705461145176; Tue, 16 Jan 2024 19:12:25 -0800 (PST) Received: from mosaic.enunes.eu (ip-78-45-66-209.bb.vodafone.cz. [78.45.66.209]) by smtp.gmail.com with ESMTPSA id n13-20020a05640204cd00b0055971af7a23sm2258418edw.95.2024.01.16.19.12.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jan 2024 19:12:24 -0800 (PST) From: Erico Nunes To: Qiang Yu , dri-devel@lists.freedesktop.org, lima@lists.freedesktop.org Subject: [PATCH v1 6/6] drm/lima: improve some pp debug messages Date: Wed, 17 Jan 2024 04:12:12 +0100 Message-ID: <20240117031212.1104034-7-nunes.erico@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240117031212.1104034-1-nunes.erico@gmail.com> References: <20240117031212.1104034-1-nunes.erico@gmail.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Zimmermann , linux-kernel@vger.kernel.org, Maxime Ripard , christian.koenig@amd.com, anarsoul@gmail.com, Daniel Vetter , David Airlie , Sumit Semwal , Erico Nunes Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Make the messages more consistent by showing the pp name. Signed-off-by: Erico Nunes Reviewed-by: Vasily Khoruzhick --- drivers/gpu/drm/lima/lima_pp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/lima/lima_pp.c b/drivers/gpu/drm/lima/lima_pp.c index ac097dd75072..d9e178d6645d 100644 --- a/drivers/gpu/drm/lima/lima_pp.c +++ b/drivers/gpu/drm/lima/lima_pp.c @@ -197,7 +197,7 @@ static int lima_pp_hard_reset(struct lima_ip *ip) pp_write(LIMA_PP_CTRL, LIMA_PP_CTRL_FORCE_RESET); ret = lima_poll_timeout(ip, lima_pp_hard_reset_poll, 10, 100); if (ret) { - dev_err(dev->dev, "pp hard reset timeout\n"); + dev_err(dev->dev, "pp %s hard reset timeout\n", lima_ip_name(ip)); return ret; } @@ -423,8 +423,8 @@ static void lima_pp_task_error(struct lima_sched_pipe *pipe) for (i = 0; i < pipe->num_processor; i++) { struct lima_ip *ip = pipe->processor[i]; - dev_err(ip->dev->dev, "pp task error %d int_state=%x status=%x\n", - i, pp_read(LIMA_PP_INT_STATUS), pp_read(LIMA_PP_STATUS)); + dev_err(ip->dev->dev, "pp %s task error int_state=%x status=%x\n", + lima_ip_name(ip), pp_read(LIMA_PP_INT_STATUS), pp_read(LIMA_PP_STATUS)); lima_pp_hard_reset(ip); }