Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1193247rbb; Mon, 26 Feb 2024 01:27:30 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVS2+dHj8M8gizQGpwNfDk7E1RtPrArmhQizkGFUvoyEAOdUMqeF86b8nK4yDF+tS96UQ1p3B2MVITi5XvHdu8c07ZrS8J+fGqlQybFhA== X-Google-Smtp-Source: AGHT+IHE/qtowqwR1f/q62NwitRnMabtM8x2xrm4R9LZmIXbPRl0mxlf1cg9hR33jx6hu0A6Vy2T X-Received: by 2002:a17:902:9a43:b0:1dc:66ac:c34b with SMTP id x3-20020a1709029a4300b001dc66acc34bmr6823250plv.68.1708939649891; Mon, 26 Feb 2024 01:27:29 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708939649; cv=pass; d=google.com; s=arc-20160816; b=CICPKOm5/weH1yyHqw/ERqveNrerWBG5h6zIwZWckOOFpsaaWeFI6TXpOWyvmqThZA bOnkPqDzKD/OkCZMTMGmrYZYRf8atwjvEB8rhmbcLUKoSiSoE5Adt340YzM6I5rvSif1 Be5tDAMPT74Bv9TBSOylnoeeDViW47qkmRqUpK4PLe/OC1Uac6gGLzMA4dOthBfTXwL5 B+EjPpeX6bSk40VzYob2wEmmOysaLlM6bFwuy9CA5ElLSzuIoOm9NUvNf9PKFtjc1cqv sQMSnLW305elc+qSl1bJwsG3pNEp88VdnvQ38VnzGIA8y6oYhyhf6/ekYhlIdGjUbOrA BCww== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=jauvlcf23xbsU6XgxRmSW75QVo1X7Eynq50wc19kNIg=; fh=I1mDzpQ2i/fckVIeMd+WKWb14s85mMQWc3/wF4wbFPI=; b=dNV9/h3FfqiJnJpBqubC9Jfz7+CSaB34xDpd1eUzb4Ksr3JakORU5VWxiZqUW/ECpD epqEK4wdNjeqEJ2/GxRYrqXMoxJ7S0570P8F6hr/nCE7nDEV2i6tmBknZjM2TFsBMLki u/ZWZWRBr9ID6+SrpXBnvj/0vic0quf7ZQ8ZnOmfJEwEK9clpK0Mh5LrG82/h/1/N1BT blroqsGWUF5D5XszXvTChfRBzUj8AOCSvSGnX2Rb7oL8l227W1wLsFKwHEOoe9c/6YoY zsgHM1xj3cP7Qd/XP+DIvcw99G+sIQRtkTsruMgLvhx+0ybIr9J2tXrnWKQtPS9YrlZA oRgQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=PUYp7zlU; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-80954-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-80954-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id i3-20020a170902c94300b001dc8798742bsi3111168pla.226.2024.02.26.01.27.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 01:27:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-80954-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=PUYp7zlU; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-80954-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-80954-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id D36A9286709 for ; Mon, 26 Feb 2024 09:27:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 160245D749; Mon, 26 Feb 2024 08:47:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="PUYp7zlU" Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) (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 945885C90D for ; Mon, 26 Feb 2024 08:47:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.196 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708937277; cv=none; b=MwgN8ISalpk2XqxEVdMn66Op1IywLXaGK4L950nGLTX/wB8E6tv1S0Ckbw04yhV9emm9FnV6tLgMS1WfqsCUHpboSUzyZKYe2caL05mOCBWt1f/EY7fEcC0VZMt76I69rddOB7M+ldjMQiCAx8ceOUj+X6Qj5jk7GFm7ImgmLdM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708937277; c=relaxed/simple; bh=ho5ra/+at2XzI2G+H45H5el5TvmKBhEa/PzPoOq31VQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=i40c3PgLr7KwhomIQNiF316SLlod92Jq7D2+Y571Tej4Fg4toMeje9jLSlCNeCURHgc8DZ73jYAbCwGKtpuWaUrCLzrH/r05XbdTd08DnVX+QASY+lmN21EJG8rWu55lgv1mO2iQ1n+xbemh1xOb6qtfyMVdJB0wCwLWcAUmf+M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=PUYp7zlU; arc=none smtp.client-ip=217.70.183.196 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id 41ACAE0006; Mon, 26 Feb 2024 08:47:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1708937266; 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=jauvlcf23xbsU6XgxRmSW75QVo1X7Eynq50wc19kNIg=; b=PUYp7zlUPZTbE6N+tI67BbSMl+2kT/v1pekq+jT6ls4v8ufLzmRu7hvUlB5LKNz4swxqy4 yaP8u75/djkufGx2u9mR3vMreCUudmcdlysI0yXsesK/NVDLV4LhErJxUNHGEIvap9t9xr XfKnuIvb+u6HvH4xQxsoQOI+ZMSSMCaLgclyOX5ihal4XzMCwBbZ+8nfS+onp/uE8GDTKd pnvYBjJf5/ygaPL7HNgg4C2hLJz3ND6b86xXzEf7ZR9/YP8qIPujeGLFVvmR3kFnXLxlaM OYZQ2V/O7cOGQHQkt7WaDy7cmGgWQm2KZ+Xkw9aa+kSoxhPkq2UeY9aFqdC8+Q== From: Louis Chauvet Date: Mon, 26 Feb 2024 09:46:31 +0100 Subject: [PATCH v3 1/9] drm/vkms: Code formatting 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: 7bit Message-Id: <20240226-yuv-v3-1-ff662f0994db@bootlin.com> References: <20240226-yuv-v3-0-ff662f0994db@bootlin.com> In-Reply-To: <20240226-yuv-v3-0-ff662f0994db@bootlin.com> To: Rodrigo Siqueira , Melissa Wen , =?utf-8?q?Ma=C3=ADra_Canal?= , Haneen Mohammed , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , arthurgrillo@riseup.net, Jonathan Corbet , pekka.paalanen@haloniitty.fi Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, jeremie.dautheribes@bootlin.com, miquel.raynal@bootlin.com, thomas.petazzoni@bootlin.com, seanpaul@google.com, marcheu@google.com, nicolejadeyee@google.com, Louis Chauvet X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=5122; i=louis.chauvet@bootlin.com; h=from:subject:message-id; bh=ho5ra/+at2XzI2G+H45H5el5TvmKBhEa/PzPoOq31VQ=; b=owEBbQKS/ZANAwAIASCtLsZbECziAcsmYgBl3FAte4zHYuK9KWpcrFdCuR6LLBDBCYaihh4ToMxt l9YvvjqJAjMEAAEIAB0WIQRPj7g/vng8MQxQWQQgrS7GWxAs4gUCZdxQLQAKCRAgrS7GWxAs4mAND/ 4s+05LVdwjC0khT96PaBh+cnib9EsdREFAJWJ5wI4DuIXYv7Zi7qPoBHeYzhM2QnSsNMa3o06vXxvG ocCR0oDkmNuwOiKTi+upM2SdDWs8HsNDooWM2+7/1GIT3t1YKW4UqLCuP9mCdHazKZL7JEPfJrLvZJ If5L2sSMWuLhTYb/6suIDZY/2oo+l7z1gtru5EFhKRvAA3myfW4iwHQAHtS55rIFgEckRQ1h7HvIos opwVxDQDCEvA0gQEUR4BI4zWzeEnAnOyJ2tRTYKNLDw+4NwHQsz31LMbKKjTfjsQ0BZIxxS7mE9/Ik JR4JSow3kYGauRC7V5sDMFHixlJ+PHFU3qguKlErH86W5/ZjbZDf4A1FM8/m7cnKy0t7fuP2Ini1zA i1mul5Xu68DepZWsL3b+k3CrjVaB/q50K0Rur2iw1xMRSRZJDeKHf7dK6PDGoqZjF4ISsLI3Mt3sTt S4TLxvYKEvFZKj2NYsCcMkzW/i7e0TWeE4YNsS8G+2p9+x3t7FDxZF/3JNVG7Hi95zhe/3GIBNMMjG LWSw/eHP/FbSDqJ2PFB47IAy6O85rS2thGKRH4Xku42mXe18PK0TESiW2GajFBgIbHlzPM2+pBxjUD Sdv1tn4l1WuuDOZUjg12MAyTL0pvQ8nIhp8PavDy0OtNR6T8Q9crnki5/lzw== X-Developer-Key: i=louis.chauvet@bootlin.com; a=openpgp; fpr=8B7104AE9A272D6693F527F2EC1883F55E0B40A5 X-GND-Sasl: louis.chauvet@bootlin.com Few no-op changes to remove double spaces and fix wrong alignments. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_composer.c | 10 +++++----- drivers/gpu/drm/vkms/vkms_crtc.c | 6 ++---- drivers/gpu/drm/vkms/vkms_drv.c | 3 +-- drivers/gpu/drm/vkms/vkms_plane.c | 9 ++++----- 4 files changed, 12 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/drm/vkms/vkms_composer.c b/drivers/gpu/drm/vkms/vkms_composer.c index e7441b227b3c..c6d9b4a65809 100644 --- a/drivers/gpu/drm/vkms/vkms_composer.c +++ b/drivers/gpu/drm/vkms/vkms_composer.c @@ -96,7 +96,7 @@ static u16 lerp_u16(u16 a, u16 b, s64 t) s64 a_fp = drm_int2fixp(a); s64 b_fp = drm_int2fixp(b); - s64 delta = drm_fixp_mul(b_fp - a_fp, t); + s64 delta = drm_fixp_mul(b_fp - a_fp, t); return drm_fixp2int(a_fp + delta); } @@ -302,8 +302,8 @@ static int compose_active_planes(struct vkms_writeback_job *active_wb, void vkms_composer_worker(struct work_struct *work) { struct vkms_crtc_state *crtc_state = container_of(work, - struct vkms_crtc_state, - composer_work); + struct vkms_crtc_state, + composer_work); struct drm_crtc *crtc = crtc_state->base.crtc; struct vkms_writeback_job *active_wb = crtc_state->active_writeback; struct vkms_output *out = drm_crtc_to_vkms_output(crtc); @@ -328,7 +328,7 @@ void vkms_composer_worker(struct work_struct *work) crtc_state->gamma_lut.base = (struct drm_color_lut *)crtc->state->gamma_lut->data; crtc_state->gamma_lut.lut_length = crtc->state->gamma_lut->length / sizeof(struct drm_color_lut); - max_lut_index_fp = drm_int2fixp(crtc_state->gamma_lut.lut_length - 1); + max_lut_index_fp = drm_int2fixp(crtc_state->gamma_lut.lut_length - 1); crtc_state->gamma_lut.channel_value2index_ratio = drm_fixp_div(max_lut_index_fp, u16_max_fp); @@ -367,7 +367,7 @@ void vkms_composer_worker(struct work_struct *work) drm_crtc_add_crc_entry(crtc, true, frame_start++, &crc32); } -static const char * const pipe_crc_sources[] = {"auto"}; +static const char *const pipe_crc_sources[] = { "auto" }; const char *const *vkms_get_crc_sources(struct drm_crtc *crtc, size_t *count) diff --git a/drivers/gpu/drm/vkms/vkms_crtc.c b/drivers/gpu/drm/vkms/vkms_crtc.c index 61e500b8c9da..7586ae2e1dd3 100644 --- a/drivers/gpu/drm/vkms/vkms_crtc.c +++ b/drivers/gpu/drm/vkms/vkms_crtc.c @@ -191,8 +191,7 @@ static int vkms_crtc_atomic_check(struct drm_crtc *crtc, return ret; drm_for_each_plane_mask(plane, crtc->dev, crtc_state->plane_mask) { - plane_state = drm_atomic_get_existing_plane_state(crtc_state->state, - plane); + plane_state = drm_atomic_get_existing_plane_state(crtc_state->state, plane); WARN_ON(!plane_state); if (!plane_state->visible) @@ -208,8 +207,7 @@ static int vkms_crtc_atomic_check(struct drm_crtc *crtc, i = 0; drm_for_each_plane_mask(plane, crtc->dev, crtc_state->plane_mask) { - plane_state = drm_atomic_get_existing_plane_state(crtc_state->state, - plane); + plane_state = drm_atomic_get_existing_plane_state(crtc_state->state, plane); if (!plane_state->visible) continue; diff --git a/drivers/gpu/drm/vkms/vkms_drv.c b/drivers/gpu/drm/vkms/vkms_drv.c index dd0af086e7fa..83e6c9b9ff46 100644 --- a/drivers/gpu/drm/vkms/vkms_drv.c +++ b/drivers/gpu/drm/vkms/vkms_drv.c @@ -81,8 +81,7 @@ static void vkms_atomic_commit_tail(struct drm_atomic_state *old_state) drm_atomic_helper_wait_for_flip_done(dev, old_state); for_each_old_crtc_in_state(old_state, crtc, old_crtc_state, i) { - struct vkms_crtc_state *vkms_state = - to_vkms_crtc_state(old_crtc_state); + struct vkms_crtc_state *vkms_state = to_vkms_crtc_state(old_crtc_state); flush_work(&vkms_state->composer_work); } diff --git a/drivers/gpu/drm/vkms/vkms_plane.c b/drivers/gpu/drm/vkms/vkms_plane.c index e5c625ab8e3e..90c09046e0af 100644 --- a/drivers/gpu/drm/vkms/vkms_plane.c +++ b/drivers/gpu/drm/vkms/vkms_plane.c @@ -112,15 +112,14 @@ static void vkms_plane_atomic_update(struct drm_plane *plane, frame_info = vkms_plane_state->frame_info; memcpy(&frame_info->src, &new_state->src, sizeof(struct drm_rect)); memcpy(&frame_info->dst, &new_state->dst, sizeof(struct drm_rect)); - memcpy(&frame_info->rotated, &new_state->dst, sizeof(struct drm_rect)); frame_info->fb = fb; memcpy(&frame_info->map, &shadow_plane_state->data, sizeof(frame_info->map)); drm_framebuffer_get(frame_info->fb); frame_info->rotation = drm_rotation_simplify(new_state->rotation, DRM_MODE_ROTATE_0 | - DRM_MODE_ROTATE_90 | - DRM_MODE_ROTATE_270 | - DRM_MODE_REFLECT_X | - DRM_MODE_REFLECT_Y); + DRM_MODE_ROTATE_90 | + DRM_MODE_ROTATE_270 | + DRM_MODE_REFLECT_X | + DRM_MODE_REFLECT_Y); drm_rect_rotate(&frame_info->rotated, drm_rect_width(&frame_info->rotated), drm_rect_height(&frame_info->rotated), frame_info->rotation); -- 2.43.0