From nobody Sun Feb 8 06:22:30 2026 Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) (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 B0A4C2E613C for ; Fri, 14 Nov 2025 09:20:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.170 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763112011; cv=none; b=Nit1FfDKONVRpjbtDHG8sery9d7zErhlBrd4lb173jrebzIIeE+E6HnjS2AdAu6Y1+bgQyonRaUPnjj26OvFEndrYZSLCDXqosVMBSeJughJrlDqJkDVaScyEJRHYX/bCrU6Qi4utahzEQCFHtDlXrSvAUDm/RSXdsBPncq/7EY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763112011; c=relaxed/simple; bh=ZnFQJZxtUsUIHVxUXxwBCT4DQoz/VkaGRng3A84SHlA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ok3F86o/95s4cWlk0SZHZAXQHgXgyJHgZo1lYM0G4CZFsib1vDRNx0j54mwF1O9sLh6VEkqLjjiwP1MdnlurhU80n7bs11nZcFunaBg7jbxgHyQ0zmnVSUeK4JNDk2n/DdfnjGEofSJ36xt8oSPJE/6pBkDnCGTUtMV/DUZOg5Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=MF9tdHek; arc=none smtp.client-ip=209.85.210.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="MF9tdHek" Received: by mail-pf1-f170.google.com with SMTP id d2e1a72fcca58-7a9c64dfa8aso1569098b3a.3 for ; Fri, 14 Nov 2025 01:20:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1763112009; x=1763716809; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=upQ6k0ymMV64RoZHGvzsGjrMnXxpx5/qvt/YZyCe3QI=; b=MF9tdHek6+myNBRPJv69E+AnWpnr44TIDdzUl/ByQSiAUsCQWhY2Vp4UGWkWaqVc8q eskVEZSvPDD/DQ8JGQc969wKDVzAueMrFOVF8x2EEoLSplKWYuUfhR+9DUjmm5Fe401P Pspme/0cxE8TOy4mIg++N4XyvVLtC9/Xd8Tp8pTp+julh0aHe7Ye3QucpOe+JXTAq6N2 7gCxscvSANVDyEdXpeEN0qotSVRQ46WDYqXS6mRodtmyDtpXYkiqQucWjosgd1oQfIWa BwEwuLqlkiSDDj1HkQLf3rgHXjxaa8eIN0UvXE+A69noQRHxSJogbvsVYewWs/TK69XN 7Dbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763112009; x=1763716809; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=upQ6k0ymMV64RoZHGvzsGjrMnXxpx5/qvt/YZyCe3QI=; b=NxQd7eZXcmCRGuORbBYjKMDXjTrckqNDs30XoM6r5O3FeUq4hI+tvgYrnNCaxjL9ET 80aHsLwFOfQsZCbrHeFEKsOZ60DPsijd37JeXKJpAKcC+fgq7+le0ZO32frX93/286nN Id5jlIlUmw8s5bf0etm6EjQBLRre2YCNI5v89IFMGG6sZl1htnEDzkaoiDs/n6Lzv/6/ P8YRkoGpzV3b/xJNfv10hpz32ucEt3ygzLUhpO2oCvS88Nadt83sYB2Shbev9VV09Kdw oUu0dH5Z0riSbM/lTpc7O9E/nt/FL1jRgjYzZa5n1uo/OHMr8gZrz0kiTX3s3MVSyv8+ Bw7w== X-Forwarded-Encrypted: i=1; AJvYcCUquiP2Lz0tx0siDUymNJ9AicUHN+80uRKkl75r6SQJyJj4hDHfnIbQxLARHYp2l7dWfA+fQ6kH8JnLd2c=@vger.kernel.org X-Gm-Message-State: AOJu0Yz8l81D3cTGG7+47iGpIC1J6qO+IGkPySkSBBgYrCKP3YERDrcJ 7lIPIvyrDoeI2WV4FonerRv9DMy1TNub1gF1GpZs5DOfEO4XS/itQkR/RF8at+mctXk= X-Gm-Gg: ASbGncsWSCktFt3Hq488CH7Uthq2mKNXD8Y89VdpRiPbErMzeVnx7v62M7MMDeU5VX0 lsm3AjoOqaqEg6rqRQh3+1/lqbrjtBn071eE4hyWgvtJh8xPXSn1TSd7ubVzLkJ2e15+2mHQAXr eObdm6NRjm0pR1ME9QLf5AFCxMxaLUwU23kZwaX561Cy6JoyD5u/chxIWvuZ+pv339B/QHR8KDy euJWZ4OGU1LQqrG2ZIkOs7jaczYa+AxHH8cIiRGcEJ3iQhrFY3HWvAfagm2J/CMnkHMZwDyzPv/ 1j2fMgvBGauaWvpEzlYW/Lrsf1bCJJXLHhwwGVtFlgz1abdFi3O9HP8JdPqHHnd55EMFgjYO3dp iC5Roeoani5pJyeCeSsFkQPMg2s+/cY21K5XNVyBzloVIk6t5fsl81atpGoJc/IDWMAM9awLTPf VhlvPexCyiXTUxEg== X-Google-Smtp-Source: AGHT+IG01bMGoXNahT9eZC/VPV0DHkm50SvIboUMeSog9zQmBqNCxWmBrQq7RTt4z02SPkqGCn4fyg== X-Received: by 2002:a05:6a20:244e:b0:358:dc7d:a2b3 with SMTP id adf61e73a8af0-35ba278d151mr3402179637.44.1763112008746; Fri, 14 Nov 2025 01:20:08 -0800 (PST) Received: from rahul-mintos.ban-spse ([165.204.156.251]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7b92772e713sm4477682b3a.54.2025.11.14.01.20.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Nov 2025 01:20:08 -0800 (PST) From: Rahul Kumar To: liviu.dudau@arm.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, rk0006818@gmail.com Subject: [PATCH] drm/komeda: Convert logging in komeda_pipeline.c to drm_* with drm_device parameter Date: Fri, 14 Nov 2025 14:48:25 +0530 Message-ID: <20251114091825.3591430-1-rk0006818@gmail.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Replace DRM_ERROR/WARN/INFO() and DRM_DEBUG() calls in drivers/gpu/drm/arm/display/komeda/komeda_pipeline.c with the drm_err(), drm_warn(), drm_info() and drm_dbg() helpers. The drm_*() logging macros require a struct drm_device * parameter, which allows the DRM core to prefix log messages with the device instance. This is important for distinguishing logs when multiple Komeda or other DRM devices are present. This conversion follows the DRM TODO entry: "Convert logging to drm_* functions with drm_device parameter". Signed-off-by: Rahul Kumar Reviewed-by: Liviu Dudau --- .../drm/arm/display/komeda/komeda_pipeline.c | 53 ++++++++++++------- 1 file changed, 34 insertions(+), 19 deletions(-) diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_pipeline.c b/drivers= /gpu/drm/arm/display/komeda/komeda_pipeline.c index 81e244f0c0ca..88d24b074e5e 100644 --- a/drivers/gpu/drm/arm/display/komeda/komeda_pipeline.c +++ b/drivers/gpu/drm/arm/display/komeda/komeda_pipeline.c @@ -18,16 +18,18 @@ struct komeda_pipeline * komeda_pipeline_add(struct komeda_dev *mdev, size_t size, const struct komeda_pipeline_funcs *funcs) { + struct komeda_kms_dev *kms =3D dev_get_drvdata(mdev->dev); + struct drm_device *drm =3D &kms->base; struct komeda_pipeline *pipe; =20 if (mdev->n_pipelines + 1 > KOMEDA_MAX_PIPELINES) { - DRM_ERROR("Exceed max support %d pipelines.\n", - KOMEDA_MAX_PIPELINES); + drm_err(drm, "Exceed max support %d pipelines.\n", + KOMEDA_MAX_PIPELINES); return ERR_PTR(-ENOSPC); } =20 if (size < sizeof(*pipe)) { - DRM_ERROR("Request pipeline size too small.\n"); + drm_err(drm, "Request pipeline size too small.\n"); return ERR_PTR(-EINVAL); } =20 @@ -71,6 +73,8 @@ static struct komeda_component ** komeda_pipeline_get_component_pos(struct komeda_pipeline *pipe, int id) { struct komeda_dev *mdev =3D pipe->mdev; + struct komeda_kms_dev *kms =3D dev_get_drvdata(mdev->dev); + struct drm_device *drm =3D &kms->base; struct komeda_pipeline *temp =3D NULL; struct komeda_component **pos =3D NULL; =20 @@ -88,7 +92,7 @@ komeda_pipeline_get_component_pos(struct komeda_pipeline = *pipe, int id) case KOMEDA_COMPONENT_COMPIZ1: temp =3D mdev->pipelines[id - KOMEDA_COMPONENT_COMPIZ0]; if (!temp) { - DRM_ERROR("compiz-%d doesn't exist.\n", id); + drm_err(drm, "compiz-%d doesn't exist.\n", id); return NULL; } pos =3D to_cpos(temp->compiz); @@ -107,7 +111,7 @@ komeda_pipeline_get_component_pos(struct komeda_pipelin= e *pipe, int id) case KOMEDA_COMPONENT_IPS1: temp =3D mdev->pipelines[id - KOMEDA_COMPONENT_IPS0]; if (!temp) { - DRM_ERROR("ips-%d doesn't exist.\n", id); + drm_err(drm, "ips-%d doesn't exist.\n", id); return NULL; } pos =3D to_cpos(temp->improc); @@ -117,7 +121,7 @@ komeda_pipeline_get_component_pos(struct komeda_pipelin= e *pipe, int id) break; default: pos =3D NULL; - DRM_ERROR("Unknown pipeline resource ID: %d.\n", id); + drm_err(drm, "Unknown pipeline resource ID: %d.\n", id); break; } =20 @@ -169,6 +173,8 @@ komeda_component_add(struct komeda_pipeline *pipe, u8 max_active_outputs, u32 __iomem *reg, const char *name_fmt, ...) { + struct komeda_kms_dev *kms =3D dev_get_drvdata(pipe->mdev->dev); + struct drm_device *drm =3D &kms->base; struct komeda_component **pos; struct komeda_component *c; int idx, *num =3D NULL; @@ -187,14 +193,14 @@ komeda_component_add(struct komeda_pipeline *pipe, idx =3D id - KOMEDA_COMPONENT_LAYER0; num =3D &pipe->n_layers; if (idx !=3D pipe->n_layers) { - DRM_ERROR("please add Layer by id sequence.\n"); + drm_err(drm, "please add Layer by id sequence.\n"); return ERR_PTR(-EINVAL); } } else if (has_bit(id, KOMEDA_PIPELINE_SCALERS)) { idx =3D id - KOMEDA_COMPONENT_SCALER0; num =3D &pipe->n_scalers; if (idx !=3D pipe->n_scalers) { - DRM_ERROR("please add Scaler by id sequence.\n"); + drm_err(drm, "please add Scaler by id sequence.\n"); return ERR_PTR(-EINVAL); } } @@ -240,27 +246,32 @@ static void komeda_component_dump(struct komeda_compo= nent *c) if (!c) return; =20 - DRM_DEBUG(" %s: ID %d-0x%08lx.\n", - c->name, c->id, BIT(c->id)); - DRM_DEBUG(" max_active_inputs:%d, supported_inputs: 0x%08x.\n", - c->max_active_inputs, c->supported_inputs); - DRM_DEBUG(" max_active_outputs:%d, supported_outputs: 0x%08x.\n", - c->max_active_outputs, c->supported_outputs); + struct komeda_kms_dev *kms =3D dev_get_drvdata(c->pipeline->mdev->dev); + struct drm_device *drm =3D &kms->base; + + drm_dbg(drm, " %s: ID %d-0x%08lx.\n", + c->name, c->id, BIT(c->id)); + drm_dbg(drm, " max_active_inputs:%d, supported_inputs: 0x%08x.\n", + c->max_active_inputs, c->supported_inputs); + drm_dbg(drm, " max_active_outputs:%d, supported_outputs: 0x%08x.\n", + c->max_active_outputs, c->supported_outputs); } =20 void komeda_pipeline_dump(struct komeda_pipeline *pipe) { + struct komeda_kms_dev *kms =3D dev_get_drvdata(pipe->mdev->dev); + struct drm_device *drm =3D &kms->base; struct komeda_component *c; int id; unsigned long avail_comps =3D pipe->avail_comps; =20 - DRM_INFO("Pipeline-%d: n_layers: %d, n_scalers: %d, output: %s.\n", + drm_info(drm, "Pipeline-%d: n_layers: %d, n_scalers: %d, output: %s.\n", pipe->id, pipe->n_layers, pipe->n_scalers, pipe->dual_link ? "dual-link" : "single-link"); - DRM_INFO(" output_link[0]: %s.\n", + drm_info(drm, " output_link[0]: %s.\n", pipe->of_output_links[0] ? pipe->of_output_links[0]->full_name : "none"); - DRM_INFO(" output_link[1]: %s.\n", + drm_info(drm, " output_link[1]: %s.\n", pipe->of_output_links[1] ? pipe->of_output_links[1]->full_name : "none"); =20 @@ -274,6 +285,8 @@ void komeda_pipeline_dump(struct komeda_pipeline *pipe) static void komeda_component_verify_inputs(struct komeda_component *c) { struct komeda_pipeline *pipe =3D c->pipeline; + struct komeda_kms_dev *kms =3D dev_get_drvdata(pipe->mdev->dev); + struct drm_device *drm =3D &kms->base; struct komeda_component *input; int id; unsigned long supported_inputs =3D c->supported_inputs; @@ -282,7 +295,7 @@ static void komeda_component_verify_inputs(struct komed= a_component *c) input =3D komeda_pipeline_get_component(pipe, id); if (!input) { c->supported_inputs &=3D ~(BIT(id)); - DRM_WARN("Can not find input(ID-%d) for component: %s.\n", + drm_warn(drm, "Can not find input(ID-%d) for component: %s.\n", id, c->name); continue; } @@ -306,6 +319,8 @@ komeda_get_layer_split_right_layer(struct komeda_pipeli= ne *pipe, =20 static void komeda_pipeline_assemble(struct komeda_pipeline *pipe) { + struct komeda_kms_dev *kms =3D dev_get_drvdata(pipe->mdev->dev); + struct drm_device *drm =3D &kms->base; struct komeda_component *c; struct komeda_layer *layer; int i, id; @@ -324,7 +339,7 @@ static void komeda_pipeline_assemble(struct komeda_pipe= line *pipe) =20 if (pipe->dual_link && !pipe->ctrlr->supports_dual_link) { pipe->dual_link =3D false; - DRM_WARN("PIPE-%d doesn't support dual-link, ignore DT dual-link configu= ration.\n", + drm_warn(drm, "PIPE-%d doesn't support dual-link, ignore DT dual-link co= nfiguration.\n", pipe->id); } } --=20 2.43.0