From patchwork Fri Aug 2 19:47:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 816376 Received: from mail-ed1-f48.google.com (mail-ed1-f48.google.com [209.85.208.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DE56C4D5BD for ; Fri, 2 Aug 2024 19:47:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722628061; cv=none; b=re+jHUowG2RmyoHLqjRp0HiTSVzobCc1rNaQv2li1KtChX40gE+5KIyl5tcsjNYKKI/bG8IVPgA+ocPYUAaF0qMEuWZ1m9hPaxizRsbcxt1aJAX36Myvu95y7RBKE/MhuupaCyfByDoSxdC08SWYTaUdCRulAewJwDJg3lMVid0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722628061; c=relaxed/simple; bh=CZjSqPH+rj057dW3MGJr9d/4aI78HIu7xqrI+Pszc6M=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=oe/ySoDCiTlKskYj2fhtW2dLMVaQBKmYHDp7uglQSZg/EWsAZTtVWM0PL1adKs/W0nUxzzGr4bMuWo6gabof/pBpfjSYVARe8hUFm5/V4dLDYExeyXr5OuolxahnBxBaV7lmRPPk/i4UoDWHXHa112xlDdNJGbX7m+xxk2oy6lU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=BFpzf32V; arc=none smtp.client-ip=209.85.208.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="BFpzf32V" Received: by mail-ed1-f48.google.com with SMTP id 4fb4d7f45d1cf-5a108354819so12184955a12.0 for ; Fri, 02 Aug 2024 12:47:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722628058; x=1723232858; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=wEhmfd96SA4u8ArVJ0CnfF56Mf7XuLe49/SsadrliSo=; b=BFpzf32VVLFE0fY9gVIFoRedlsjdWKg0MBYT1wm90F70u4tqnSknn+WVz2AIf0Pawa ri4EJPgL+z94/poun9I7r3xiubWU87I8vOW2oLCv4NqsZ4yKeHQTA5uQNIOP2Ixp/2EN vxFubkKo48S6UyHILrBY3n0o+y3W2d0EAIpYw5s4ugyjLEWpfEO8AvqyYTb4fMp6jPXB 1HwmM6FL2J652Zr5/4TgzxI17idv4chsFTR+AUcUdXTdu3jJCSz/kayLC7tVm6UyUeT7 Xcz4637SgtwTcy7Fb1H9jz8Xak+Uv9TuH1wbjwI23guLjdMuYdfsgFNrqCRan7cUvPDK 0YGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722628058; x=1723232858; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wEhmfd96SA4u8ArVJ0CnfF56Mf7XuLe49/SsadrliSo=; b=bzYfdocTgIfFf6a3vwzOKZbxzIYy9MfbK9HDIGSZpAPFe2YXBwELHdXJk/UPYfKGtj Z1Y8q65+AM0xv6b07HQjveM097d9U4Yhmm8Bk0Hd7kQ2GZxSglC+WuVx9JVW34dd6eFm zRW/ivvsfrj7aFo8srxpXvHX/rZnCTC9IaMahtenKna1pbnvmPGmuaO47o74w9GSlnGp 51UxjFYVncj1UaY6D94thiToFqRFRoBoToCwqPn6D/Kd6Y1Mjv9h8pbP2ZEvp/hWsrJB 8wlHJi1M72+oy7MZs8odEjldiuVZqj9S+xMUpQg7WHhPJd6cTpE6fCeMJBAr1fuZ326c CR0A== X-Gm-Message-State: AOJu0YyfDZLDPsqmChzQNqhifqx0YBofxQLhBppGotAvIhyz3cFOmUur /b8198CjKN1pN+fNWupGpxz5Y46g4n1hU+jxglS9mrS5OfgfAdyoxrAyzzI2D6XulMmCWx3fL7l K X-Google-Smtp-Source: AGHT+IGE4H1l5ZsQO9E8ceCmygqDIf/qjenXKaWKCLGw6BamqRCWYmwVW9jR+CpmmBFPOxP7jM8YAw== X-Received: by 2002:a05:6402:22e5:b0:5b9:3eaf:5bc with SMTP id 4fb4d7f45d1cf-5b93eaf0729mr1053960a12.10.1722628057999; Fri, 02 Aug 2024 12:47:37 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5b839b2b556sm1440939a12.25.2024.08.02.12.47.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Aug 2024 12:47:37 -0700 (PDT) From: Dmitry Baryshkov Date: Fri, 02 Aug 2024 22:47:33 +0300 Subject: [PATCH v2 1/2] drm/msm/dpu1: don't choke on disabling the writeback connector Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240802-dpu-fix-wb-v2-1-7eac9eb8e895@linaro.org> References: <20240802-dpu-fix-wb-v2-0-7eac9eb8e895@linaro.org> In-Reply-To: <20240802-dpu-fix-wb-v2-0-7eac9eb8e895@linaro.org> To: Rob Clark , Abhinav Kumar , Sean Paul , Marijn Suijten , David Airlie , Daniel Vetter Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, Jeykumar Sankaran , stable@vger.kernel.org, Leonard Lausen X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1407; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=CZjSqPH+rj057dW3MGJr9d/4aI78HIu7xqrI+Pszc6M=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBmrTfXVU98v4RdmnOEY+K+nRJyLA96hWSyJIZSr MswZGwbrPCJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZq031wAKCRCLPIo+Aiko 1ZxzB/4gpy2NQ+2mx80O3Kz0q+HVUPc3URApbvAha2Yb7GvUpdAbK1nwua1IPGobkTXNh9v15ei lf+uzXbapFyKVZnkGIQ+X3bSZTkbmmLkJ/TkgCOUv2ucDVfz4DvvLZEb3Jplh7J6IoD9N8BQPYQ JsRmN3zHQvMQeeS1yMH4w9tVbaxo+P/G9y8bT2kJW2p4XTKs6DvG3kFgGW5bEyZz/uSySPxzjBM VOy1s55OHDe8smm7pqZd1lFxnERRK+7YyPddOSVRs42aCvkdpGXviUjQv8EfQnjO4689p8G0xBL ye8PxKGpZreVH5mlA7rRzii5EU58m8gRY/kLjQY4q7q/MIqz X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A During suspend/resume process all connectors are explicitly disabled and then reenabled. However resume fails because of the connector_status check: [ 1185.831970] [dpu error]connector not connected 3 It doesn't make sense to check for the Writeback connected status (and other drivers don't perform such check), so drop the check. Fixes: 71174f362d67 ("drm/msm/dpu: move writeback's atomic_check to dpu_writeback.c") Cc: stable@vger.kernel.org Reported-by: Leonard Lausen Closes: https://gitlab.freedesktop.org/drm/msm/-/issues/57 Signed-off-by: Dmitry Baryshkov Tested-by: György Kurucz --- drivers/gpu/drm/msm/disp/dpu1/dpu_writeback.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_writeback.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_writeback.c index 16f144cbc0c9..8ff496082902 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_writeback.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_writeback.c @@ -42,9 +42,6 @@ static int dpu_wb_conn_atomic_check(struct drm_connector *connector, if (!conn_state || !conn_state->connector) { DPU_ERROR("invalid connector state\n"); return -EINVAL; - } else if (conn_state->connector->status != connector_status_connected) { - DPU_ERROR("connector not connected %d\n", conn_state->connector->status); - return -EINVAL; } crtc = conn_state->crtc; From patchwork Fri Aug 2 19:47:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 816640 Received: from mail-lj1-f178.google.com (mail-lj1-f178.google.com [209.85.208.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D769F6A33A for ; Fri, 2 Aug 2024 19:47:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.178 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722628063; cv=none; b=YC8T2h+RXd8zAWCwU6dwvT9FRDInzGtl+dqdM0nEvdndZY2tnQjY8q9W0edjFmqDjbrK/SLjkDgsWQiHQ2EYvz6anfLgh/2vJek6mcs/z6uWP4sYt+8laObEKp/x/VLtJyu9M1y6DmHuvXKtYggSrC4Hnej2YSAlzGhG0r7mpK0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722628063; c=relaxed/simple; bh=2b3yRHs49eX/1vL+P+Me3WH5qiaxmmgj2T78MMKIwZg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Std8HhbzF3tkVIMPAfsTGiYD7c56dj8Vx/iHCdoqt+Jh531DtSg3sNPdXyYuCxYLEH47h7djEof4v8R7Is3jmdFHIE/VUBXxq7wnjvq5UsnbYVERYcYHToPH1/plnoyIzYktxM3yQoMKufWX0ujBjNl7xO+iP/0Ry5E1UWd0A8k= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=hD0J1vhX; arc=none smtp.client-ip=209.85.208.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="hD0J1vhX" Received: by mail-lj1-f178.google.com with SMTP id 38308e7fff4ca-2ef2cb7d562so106605541fa.3 for ; Fri, 02 Aug 2024 12:47:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722628060; x=1723232860; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=I0kj6XTh90iEEbA0uytJvfTg6LVq22XyHCEfhbdwFAc=; b=hD0J1vhXM0azhkqLd14g7Bp41kDqZ5PkODfwQNZ3raO1yL7bOscgJdbzfctshB+9b1 8XglGCNFyeBW56pmLUJD40g6GIjsNdmBaUOJ4MoMLCFilYK6h/Bagn++fDP62t54+Cx0 Td+5dlcwABSlg5CMzqbhi/Sppa/gPmt0NrnlTfv+lT8czFJ5BQHkvknT6voG+csFD0iJ gK+x1U9GIOg1ahqgcrGC3M/Udj0c/9fDODvi6nQprvx8GympNMvOahpL1qLTTiTuGTK2 qYk/qnGfZSO6EglmJjZmq8X6dXW9P9HrurmuhY9M7jJWAIwXxt5gK4s2WQK6d3cuq8rk M97w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722628060; x=1723232860; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=I0kj6XTh90iEEbA0uytJvfTg6LVq22XyHCEfhbdwFAc=; b=pOKfyR34TeysCHAPVkY+xdOsaJ7gFk4zTq5ZP/HB8Vi1EHpdqSl5y3RjwK2WM1QkGK 30Z2pGxijG79VajxoWx24L0DflqBv9t40ww+4sjs4xxO/9FlP/4h2MefStdbu1P9a0ES W+0RX/iy6usRqfOcnbfd26H4eF8FQRcxpDFOUZ8QivhBqa6WdE4YuHcOzZYyKSlFFQno AD7KJu+M01D1GwA/rzWwuDT9R/hw3w4q8pdENF4KyeJd0gwItj3/Qr8BkeFkYGzm/Pu6 uP9lO6Qpz2vFmLEo1M1zEB2INTFLtvzAH/dfWN66gEcdcErW4eWJYKtchM4Ivx0jhjg+ QXHA== X-Gm-Message-State: AOJu0YxDo+v7ESMAJb8zKmBoQiDuqoX/I0AZTMWiiLKJMbXp/VGyEr4i dTksXN9Oa2Wva+7/xQbnoXEV76UDooJ9l06WZ4eHcTGkkXxBKEYxejZNnmPp2amnNwzfyR2w/su s X-Google-Smtp-Source: AGHT+IHC5pWQV5sUThqfkpYlt5hVUslppx0/7sOiLjAwX+Cah1N052U8+NZUkk4YN5HoI/4FIhX3ng== X-Received: by 2002:a2e:9107:0:b0:2ec:57c7:c737 with SMTP id 38308e7fff4ca-2f15ab24bd2mr32139401fa.40.1722628059116; Fri, 02 Aug 2024 12:47:39 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5b839b2b556sm1440939a12.25.2024.08.02.12.47.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Aug 2024 12:47:38 -0700 (PDT) From: Dmitry Baryshkov Date: Fri, 02 Aug 2024 22:47:34 +0300 Subject: [PATCH v2 2/2] drm/msm/dpu: don't play tricks with debug macros Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240802-dpu-fix-wb-v2-2-7eac9eb8e895@linaro.org> References: <20240802-dpu-fix-wb-v2-0-7eac9eb8e895@linaro.org> In-Reply-To: <20240802-dpu-fix-wb-v2-0-7eac9eb8e895@linaro.org> To: Rob Clark , Abhinav Kumar , Sean Paul , Marijn Suijten , David Airlie , Daniel Vetter Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, Jeykumar Sankaran X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2383; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=2b3yRHs49eX/1vL+P+Me3WH5qiaxmmgj2T78MMKIwZg=; b=owGbwMvMwMXYbdNlx6SpcZXxtFoSQ9pa8+s35u2WXFa2pm5rf9vtTZ2JXnH3Zy+0C47kqbxTW LSb8ezaTkZjFgZGLgZZMUUWn4KWqTGbksM+7JhaDzOIlQlkCgMXpwBMRHYRB0NfxVePmPnNa0+1 pehX92+faVPQribE+KP6RvQjy4ju/SmFXzdu1/T/s5B1Lsc9LpW3gu/iU77+vmUcH361pKREo88 wNYG9bO33qi/nvDaY7VjK/jTe4d8jh9KUpIyw5Ox4IT8L81WOu7bVbXLZPo2Nxa70YwlT+eWHHQ 18fa0tcpf4r+ZxR27ZFra8VDVBPuLqsT79cqcvj3Rd64IN/2lvduL+uLko4CPfndhbdelp76ydl 6p9feAn+UB//6r5Rv2LBYQyPR2kEuu/qDF5TlLt7Zv1IWRig0rH52DrLgV7W+mmpAPdE6dv/TE1 Lsfw21SrafPiPm/cfdNlpWPndZm5loayJ7MTvpvWKEUDAA== X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A DPU debugging macros need to be converted to a proper drm_debug_* macros, however this is a going an intrusive patch, not suitable for a fix. Wire DPU_DEBUG and DPU_DEBUG_DRIVER to always use DRM_DEBUG_DRIVER to make sure that DPU debugging messages always end up in the drm debug messages and are controlled via the usual drm.debug mask. I don't think that it is a good idea for a generic DPU_DEBUG macro to be tied to DRM_UT_KMS. It is used to report a debug message from driver, so by default it should go to the DRM_UT_DRIVER channel. While refactoring debug macros later on we might end up with particular messages going to ATOMIC or KMS, but DRIVER should be the default. Fixes: 25fdd5933e4c ("drm/msm: Add SDM845 DPU support") Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar --- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h index e2adc937ea63..935ff6fd172c 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h @@ -31,24 +31,14 @@ * @fmt: Pointer to format string */ #define DPU_DEBUG(fmt, ...) \ - do { \ - if (drm_debug_enabled(DRM_UT_KMS)) \ - DRM_DEBUG(fmt, ##__VA_ARGS__); \ - else \ - pr_debug(fmt, ##__VA_ARGS__); \ - } while (0) + DRM_DEBUG_DRIVER(fmt, ##__VA_ARGS__) /** * DPU_DEBUG_DRIVER - macro for hardware driver logging * @fmt: Pointer to format string */ #define DPU_DEBUG_DRIVER(fmt, ...) \ - do { \ - if (drm_debug_enabled(DRM_UT_DRIVER)) \ - DRM_ERROR(fmt, ##__VA_ARGS__); \ - else \ - pr_debug(fmt, ##__VA_ARGS__); \ - } while (0) + DRM_DEBUG_DRIVER(fmt, ##__VA_ARGS__) #define DPU_ERROR(fmt, ...) pr_err("[dpu error]" fmt, ##__VA_ARGS__) #define DPU_ERROR_RATELIMITED(fmt, ...) pr_err_ratelimited("[dpu error]" fmt, ##__VA_ARGS__)