mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Luigi Santivetti <luigi.santivetti@imgtec.com>
To: Alessio Belle <alessio.belle@imgtec.com>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>
Cc: <imagination@lists.freedesktop.org>,
	<dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>,
	<frank.binns@imgtec.com>, <brajesh.gupta@imgtec.com>,
	Luigi Santivetti <luigi.santivetti@imgtec.com>
Subject: [PATCH 1/2] drm/imagination: switch to inline init of rogue_fwif_rta_ctl
Date: Wed, 4 Nov 2026 19:28:16 +0000	[thread overview]
Message-ID: <20261104-minor-improvements-v1-1-cc976128538e@imgtec.com> (raw)
In-Reply-To: <20261104-minor-improvements-v1-0-cc976128538e@imgtec.com>

Rely on implicitly zero-ing all members using designated identifiers.

Signed-off-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
---
 drivers/gpu/drm/imagination/pvr_hwrt.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/imagination/pvr_hwrt.c b/drivers/gpu/drm/imagination/pvr_hwrt.c
index 05c68c78da22..3f7c4346c52c 100644
--- a/drivers/gpu/drm/imagination/pvr_hwrt.c
+++ b/drivers/gpu/drm/imagination/pvr_hwrt.c
@@ -358,8 +358,8 @@ hwrt_data_init_fw_structure(struct pvr_file *pvr_file,
 			    struct pvr_hwrt_data *hwrt_data)
 {
 	struct drm_pvr_create_hwrt_geom_data_args *geom_data_args = &args->geom_data_args;
+	struct rogue_fwif_rta_ctl *rta_ctl = &hwrt_data->data.rta_ctl;
 	struct pvr_device *pvr_dev = pvr_file->pvr_dev;
-	struct rogue_fwif_rta_ctl *rta_ctl;
 	int err;
 
 	pvr_fw_object_get_fw_addr(hwrt->common_fw_obj,
@@ -378,13 +378,9 @@ hwrt_data_init_fw_structure(struct pvr_file *pvr_file,
 	hwrt_data->data.macrotile_array_dev_addr = rt_data_args->macrotile_array_dev_addr;
 	hwrt_data->data.rgn_header_dev_addr = rt_data_args->region_header_dev_addr;
 
-	rta_ctl = &hwrt_data->data.rta_ctl;
-
-	rta_ctl->render_target_index = 0;
-	rta_ctl->active_render_targets = 0;
-	rta_ctl->valid_render_targets_fw_addr = 0;
-	rta_ctl->rta_num_partial_renders_fw_addr = 0;
-	rta_ctl->max_rts = args->layers;
+	*rta_ctl = (struct rogue_fwif_rta_ctl){
+		.max_rts = args->layers,
+	};
 
 	if (args->layers > 1) {
 		err = pvr_fw_object_create(pvr_dev, args->layers * SRTC_ENTRY_SIZE,

-- 
2.43.0


  reply	other threads:[~2026-11-04 19:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-04 19:28 [PATCH 0/2] drm/imagination: minor code improvements Luigi Santivetti
2026-11-04 19:28 ` Luigi Santivetti [this message]
2026-11-04 19:28 ` [PATCH 2/2] drm/imagination: drop unused arg in free_list_create_fw_structure() Luigi Santivetti
2026-11-10 17:35 ` [PATCH 0/2] drm/imagination: minor code improvements Alessio Belle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261104-minor-improvements-v1-1-cc976128538e@imgtec.com \
    --to=luigi.santivetti@imgtec.com \
    --cc=airlied@gmail.com \
    --cc=alessio.belle@imgtec.com \
    --cc=brajesh.gupta@imgtec.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=frank.binns@imgtec.com \
    --cc=imagination@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®