From nobody Fri Dec 19 17:36:30 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 B5062266B52 for ; Thu, 13 Feb 2025 20:45:03 +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=1739479505; cv=none; b=KnSDHscgzkEUdt9obzh1leDY0Z/DhA4VAcGcRgJo84navTEIBc6SuzmzmPJJ+U/cUctB1buDNwk+jEma5HJ7/706NrZc/EZzJ1g2awXw7lzRYReyoqWBPj2hPjO3zZk7GghhXjdJXEn/uxqzcJv1e+YakHQlellPN2dLe8myS5Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739479505; c=relaxed/simple; bh=NgQkw3fJrXKO9nraFJowIvqsdluYZBFiFgGpPliMpKo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Mp7lcuwUpTBtbC6qkrRhVfpxVTeOgRDrskHMlJ2Xqxdc9e3ILsh5xM33Xu5UEgMFadmSDj3WuoHvr5Ns0DR2beJ4hbHXRPPnNFTShUAjXueWP9jK9xRiESKA1APzpaafhJBHyytHI5Zu70HmDIJVyX2qOWshCzI48zr08mQOykc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none 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=BgAZzw6c; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none 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="BgAZzw6c" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1739479502; 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=4d5n7MwydCaeIEa3g6VWk6OunUyayXxQhaDbMDiCs1I=; b=BgAZzw6cka57bRZekEnx5WF8yGe0MAJhtmQHDQzlNhSkIUBbm9ZkEdPh4QlwQlQjKJaQAT c723QP5fhTiFr0jl56j9+eKb7lLGszYFSQpRxK7XdjeKD9/vBFzWFTEyx1mdISaYXa2oiP gMGOT4+Rx/4B/TPKV1SEY6AWG21MPq0= 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-421-G8tltVPGN5GDyJmnl7tXVg-1; Thu, 13 Feb 2025 15:44:57 -0500 X-MC-Unique: G8tltVPGN5GDyJmnl7tXVg-1 X-Mimecast-MFC-AGG-ID: G8tltVPGN5GDyJmnl7tXVg 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 AFDA818004A7; Thu, 13 Feb 2025 20:44:54 +0000 (UTC) Received: from asrivats-na.rmtustx.csb (unknown [10.2.16.199]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 4449C190C541; Thu, 13 Feb 2025 20:44:51 +0000 (UTC) From: Anusha Srivatsa Date: Thu, 13 Feb 2025 15:44:20 -0500 Subject: [PATCH 03/20] drm/panel/asus-tm5p5-n35596: Move to using mipi_dsi_*_multi() variants 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 Message-Id: <20250213-mipi_cocci_multi-v1-3-67d94ff319cc@redhat.com> References: <20250213-mipi_cocci_multi-v1-0-67d94ff319cc@redhat.com> In-Reply-To: <20250213-mipi_cocci_multi-v1-0-67d94ff319cc@redhat.com> To: Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Joel Selvaraj , Ondrej Jirman , Javier Martinez Canillas , Jianhua Lu , Robert Chiras , Artur Weber , Jonathan Corbet Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Anusha Srivatsa X-Developer-Signature: v=1; a=ed25519-sha256; t=1739479476; l=1945; i=asrivats@redhat.com; s=20250122; h=from:subject:message-id; bh=NgQkw3fJrXKO9nraFJowIvqsdluYZBFiFgGpPliMpKo=; b=pGiRvGiqDPi+pHsg2Io/0Zc8uoXS+WOEgZXMlu2m93OPpwB0WWHp+hEDdXjRizKJ3/lbEB3Tv Pgsk7/s634+BRvMcrz/WU080tl0CRBAjzRFvQ8LavNJE8Ql35Z3lhD6 X-Developer-Key: i=asrivats@redhat.com; a=ed25519; pk=brnIHkBsUZEhyW6Zyn0U92AeIZ1psws/q8VFbIkf1AU= X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 Stop using deprecated API. Used Coccinelle to make the change. @rule_3@ identifier dsi_var; identifier r; identifier func; type t; position p; expression dsi_device; expression list es; @@ t func(...) { ... struct mipi_dsi_device *dsi_var =3D dsi_device; +struct mipi_dsi_multi_context dsi_ctx =3D { .dsi =3D dsi_var }; <+... ( -mipi_dsi_dcs_write_seq(dsi_var,es); +mipi_dsi_dcs_write_seq_multi(&dsi_ctx,es); | -r =3D mipi_dsi_dcs_exit_sleep_mode(dsi_var)@p; +mipi_dsi_dcs_exit_sleep_mode_multi(&dsi_ctx); | -r =3D mipi_dsi_dcs_enter_sleep_mode(dsi_var)@p; +mipi_dsi_dcs_enter_sleep_mode_multi(&dsi_ctx); | -r =3D mipi_dsi_dcs_set_display_off(dsi_var)@p; +mipi_dsi_dcs_set_display_off_multi(&dsi_ctx); | .....//rest of the mipi APIs with _multi variant ) <+... -if(r < 0) { -... -} ...+> } Signed-off-by: Anusha Srivatsa --- drivers/gpu/drm/panel/panel-asus-z00t-tm5p5-n35596.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-asus-z00t-tm5p5-n35596.c b/drivers= /gpu/drm/panel/panel-asus-z00t-tm5p5-n35596.c index b05a663c134c974df2909e228d6b2e67e39d54c0..aedf644b4a81649fd9a17b6dfdc= db95be1d5762c 100644 --- a/drivers/gpu/drm/panel/panel-asus-z00t-tm5p5-n35596.c +++ b/drivers/gpu/drm/panel/panel-asus-z00t-tm5p5-n35596.c @@ -168,14 +168,12 @@ static const struct drm_panel_funcs tm5p5_nt35596_pan= el_funcs =3D { static int tm5p5_nt35596_bl_update_status(struct backlight_device *bl) { struct mipi_dsi_device *dsi =3D bl_get_data(bl); + struct mipi_dsi_multi_context dsi_ctx =3D { .dsi =3D dsi }; u16 brightness =3D backlight_get_brightness(bl); - int ret; =20 dsi->mode_flags &=3D ~MIPI_DSI_MODE_LPM; =20 - ret =3D mipi_dsi_dcs_set_display_brightness(dsi, brightness); - if (ret < 0) - return ret; + mipi_dsi_dcs_set_display_brightness_multi(&dsi_ctx, brightness); =20 dsi->mode_flags |=3D MIPI_DSI_MODE_LPM; =20 --=20 2.47.0