Received: by 2002:ab2:78c:0:b0:1ec:b906:25e5 with SMTP id h12csp256257lqe; Fri, 23 Feb 2024 03:38:28 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCV9nLvA7BrsUey4G2seiRxoZEbiTJV6U/7jYBlfOainjjf6eEv0lWwDHxgYzV5SZGOBbKb0zGKbPkMSHg/rJwiKh/DmZYCtNrR3ifd7Ew== X-Google-Smtp-Source: AGHT+IF5PwLL99TjHuCNHtyiDqdGy/d3kN592VHXwdGJ1RSNua+HXwcabVTp7vGEBoe1/iJjiayu X-Received: by 2002:a17:902:d4d2:b0:1dc:6aa2:50e5 with SMTP id o18-20020a170902d4d200b001dc6aa250e5mr2316060plg.19.1708688308640; Fri, 23 Feb 2024 03:38:28 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708688308; cv=pass; d=google.com; s=arc-20160816; b=HWk0Keg+8n9OCx9CnyUl6T8QnPZQm9WXNLsY80kt1fFcPW9RTI/wChhZyWEIUINp0Z 2MDl3nOenLda3FwPRAix2rfJ4rbuxZjLEZL7o6Mb9+4tZu1iLxPBmZlN7ZNiy9w/4vwF TDlHQMvDGhb8M7YWPscI4WSYAl2m1ChvzIjgu+UTSXhpXHLNXP/tfPQWZE0v3wwJx+Zz Mg5tb0Jb75gaHJAL59fQ/t+FteDFbP0NCC1zGc+0QTMTpIjafCjwCQJDDX1ghLf01RPX MNrfABKFXIOXkKAbfw/zEGs+sE3KvE+lCI7x8BEl1ijobEW2vz0GmNiluPEEkEJoUsTm Uzcg== 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=iHhInxAKO971yxjXRXHdZ2xJcC9kj/+DtynTqxKEQCo=; b=krOrSMK2UMT2MmGN3U9AahUY/zpgV7Sx0UvxEoy+rR9639d++aZg2WM7XiG0mlnfm7 JfpUL9ZbJ3AxQmpkBRjAmSuG+ccD2WK2g7IRdrs/9hJk0WpSXk9sGOgBWTuwSnMi6v0X xxbN4cyyfapsse7aTidp9BOYecouVce/qQ24tTtIFgY9JKExObzdegD9GA6xGRUBHiqI VOlXQPz36QXSmMlmsyxpaqBMDL6eDNXqPcOn/qt6jS5MDjAFdUz4H819abmeku3iMf2+ PukroQ/SFgNmfQ9Xx7+NV3cpZ3EFDo+sxL30rAQqD+BO4gnsFufY900qguDOFCJ85zGb ybuw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=AaVqdbOk; 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-78232-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78232-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. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id o9-20020a170902d4c900b001d9859103e0si12076641plg.153.2024.02.23.03.38.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 03:38:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-78232-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=AaVqdbOk; 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-78232-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78232-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 4FD64282AA7 for ; Fri, 23 Feb 2024 11:38:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C08B07BB15; Fri, 23 Feb 2024 11:37:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="AaVqdbOk" Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) (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 5BAE47AE49 for ; Fri, 23 Feb 2024 11:37:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.194 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708688268; cv=none; b=Wd3JcqFGAsxLNJEpbQgVKupsI6VWRdGiRG0IMpLnPkf97dTNGE7XnnyK1hGbVGUhWkDPUPzYIl2reir5jbt6zxFzzxvbhYj6e6mUXz0GpkSJp0GJxp6Nem5zGKzdYd7IMVGQj8lf6XqLULy3zupWVPt30XymotEDBQBxNqu7bQ8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708688268; 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=KPV5LFijMxJyAeYRUMmd8Kkfp2CbWzKL5AtImZja3DUROF0x+pnDnMeZIZmdxF3OqJi0hNeOs46fEoB4C9vaDm9wgZ5eLuB8O/MGazPKymPWG2MO0zaPsZGSLIn8805KEuCk1XJmD1VzUQqcw4hYcTL3uu3ZvOH7kgfl2GXZ3Ek= 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=AaVqdbOk; arc=none smtp.client-ip=217.70.183.194 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 E1FD540004; Fri, 23 Feb 2024 11:37:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1708688264; 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=AaVqdbOkmeTEFh0jua2LQqqQ/IHi8VMn7yLiwhk1v6YsqS5iED2WAc3ciM0NJpZNaTxDPo ST3iRX4sysDjzMbG8KjKChWS2nzJi5HWZ9XpuUpVQWhS3239Oy5Hi6skpehPGHSNrScc7W KpkVjTLZjEfSCcEJIRxEHmD1gbNPTOYppDDL0kPfgokXprS7y6MlR0LcCxaCi4sw6czdJ4 PrVHjJGrsmCI6qyCX0rC4StU8kEVS0Bu24lNMVkWiim6e+Rr3L17sI+1zEIa8GTXtxh5vg u1+7I3/3z7Qv2dLR4gxBs8u301LILtRP4VuqAP1igFnHviqCgrF3JOheVCZCbA== From: Louis Chauvet Date: Fri, 23 Feb 2024 12:37:21 +0100 Subject: [PATCH v2 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: <20240223-yuv-v2-1-aa6be2827bb7@bootlin.com> References: <20240223-yuv-v2-0-aa6be2827bb7@bootlin.com> In-Reply-To: <20240223-yuv-v2-0-aa6be2827bb7@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 Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, jeremie.dautheribes@bootlin.com, miquel.raynal@bootlin.com, thomas.petazzoni@bootlin.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/ZANAwAIASCtLsZbECziAcsmYgBl2IOEeZ1zBV6oRl+S7dwdRWetCduC3xc55rn14+BD 7bSVhv6JAjMEAAEIAB0WIQRPj7g/vng8MQxQWQQgrS7GWxAs4gUCZdiDhAAKCRAgrS7GWxAs4sBDD/ oD2oHI4v28L03DC7DKTVye+dadv3A9MQNK/fgrzJkSynkYMu6VVI0/T2AKq08m8Jtnh1RFF5fyc2+I 5NcT922AjqWj0vD9BjW4Hnq45WymrQtrFOuIPPuPXGzjKxC5wCl0+QNKXJAH5CBK3ILhkUnXZZHcQ2 RCOd39QdMBArCWlMrs5JNWhXNKnSusvzeI87Td7lys52GTVcxfZC+2B8YhFOURlqPFgjzJksCF+fXx XNyFe8HimPwOAiVlTnh1D4NRKf5ebjFuCI/Ts6o3E/NafdfDj9uwFSJhHo0iwVBZYkvrQr3Zusw8Xu vSQ0wI6mUOq0yhsnCDDfsy+yPTxUmJzo0CjNgkXMZtbgYkfV1Q5R9qFIhzTL5umfkql1jYIBWnQfJa VOMV93k3FwSusN0d0hNuXSYNz9AJKX7/QeMnnMYTqe7xy7swhFdwLbgCKXKYsWViu9347e+SNpYkNm WWU1lClvEm88FAVZDolkpiQTWFJbdXqFNGuWby1EOm2ECcaWoJ3qm38oFMO6Sw1sAmYJhjp0gsfNHL qQCqV49UdBZE6eXtk7Av0LE5UywX51pl4FRI957yesNGeAEHE2PJP+YAR6+Dnfjlae3h7hM/0eOeUg BB4dlY8LVmNi8E40wObmof/K4b3jClzR5zAwTDwSWkkvlSWYEqlsyj1krq1Q== 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