Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp1976815lqe; Tue, 9 Apr 2024 06:25:58 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWILAEsUC+ODmcjQ2NSbHNqP1mvQ/BTIN0B37tF4fNcK9KcRpNcDWQGQkxVV20K+4hFkL8RzWZj4EYGSIOhTfUsTbcwCAuIAqNHmm1dQA== X-Google-Smtp-Source: AGHT+IGwNPEdS70jjFEOADqxBdeuoKQN6gJWks4zmHAd6VJ/2Po8Ixeq2UaBn8HHhksiCDSFj4J+ X-Received: by 2002:a50:cdd5:0:b0:56e:2a6a:8d3a with SMTP id h21-20020a50cdd5000000b0056e2a6a8d3amr2673962edj.15.1712669157860; Tue, 09 Apr 2024 06:25:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712669157; cv=pass; d=google.com; s=arc-20160816; b=UNfR5ViK5YAv7iBUhvW2nTwpEKQrj0Re14hCHM8ZbVXWN84VZNiJpbfQO4v2dUrTZc 6mZD5hdCMRYodAyM6omu3MeRyKD5dp53xCIEeEgJMhUPivKiuDtebWAYNwKLe+M9vMtv ozxW8p9+/7SAEHtC6+g8+7lfUt5w+jrgEdeTkjKvjkhH+yjxvE2LxwcqxEPqS2rc74k/ g2nnqv37cDY5oSNcUB0aT37iqZl4+fzvR4PH3bRuCzuoi7ZYIG0DGt0O7A5ySBhDE6BN HWbHit7Bdw6f9wfdSHSa6G4KL56Qet3mxFM/uvcPQUwYR+tPAhCFtXfnfUnnDn68FZUe DPNw== 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=UcMT+vo8fgkNrjXMLk1SAa4ydpU1c4KtU31Ws4EQRDU=; fh=VAOzQyCZUIkIVRfkT59kO+F4O4ceAQVh6KAZCdsXYJ4=; b=B5zNMHrNDyJhaPdsm4xqeMivFKL0+zxPq23SJrFoBBOCaI6l7kSCIgNe8OmpDhTOcI OhwMXNBzd63JH8a9lHY2OWqKII6JCa/dmBSV5Tk64I2qTgSQ6d9A+IkV3O2tO04T7RDn 9MFVchyUywFvuyQn7D80fxy1gGNnbUI8NcjrYtu5Z142QEKeNR+Iu29PhA4TVS39EkR5 GWgzWEdec6hDYCmLYSc9QU5M8rtYjCbjkKr2ELcU+baf5g3Vi+vlkSTxuRjBGRkAsuTy wYBDW63Jxn+C0oW8T0WMbUZMynFARSzWPcmtAv12Nw+uu3xJGeGZ6n58doAVpIIoulYe WOtQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=gPaNz7GW; 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-136939-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-136939-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 30-20020a508e1e000000b0056e2abf021asi4657338edw.256.2024.04.09.06.25.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Apr 2024 06:25:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-136939-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=gPaNz7GW; 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-136939-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-136939-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 6748E1F220E0 for ; Tue, 9 Apr 2024 13:25:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8A8C312F586; Tue, 9 Apr 2024 13:25:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="gPaNz7GW" Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) (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 38B4A12E1C9 for ; Tue, 9 Apr 2024 13:25:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.193 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712669148; cv=none; b=lQFzD1W7/qeAHfn7viack682ddVZ1ZYX41S+5vvmWrv4nIPb9NxjgGCeehAxOIR5K/EkdzVYPL1eG3LKqoax6vJwGlOQSansqU9GIyUuhhAlddqs8cI7RtL6X3Juw6TmEWScxe66rojG6TLrJ943ONMF1Nl7tyB71aF+S/d9qx8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712669148; c=relaxed/simple; bh=Ctv1MLMXYDKALnFrvVXqUApJNktccSvUqf8PTlsd3Vk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=gWC6NNAob9G9GGbr/9MpA+ElSVR2pBCSVcs0RtDeNNlTAK3+nnkASCJXrYvQDbCWRcljyv770JM4bJEuhn9qVJa/X70LIENKIdF4Y5AMhskb+bQtrOb9fb8hHItaaqFw2gtfgDIMIREi1z8axeWAzr9Lsc5YtN20m8WiA098Cxs= 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=gPaNz7GW; arc=none smtp.client-ip=217.70.183.193 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 6714324000C; Tue, 9 Apr 2024 13:25:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1712669144; 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=UcMT+vo8fgkNrjXMLk1SAa4ydpU1c4KtU31Ws4EQRDU=; b=gPaNz7GWryUK3TbCh1q2424leY0K5zz+Fqv/oSZahzQKVdXc9bYlRSZ1Q2rKn44q6+Hhuf tIb400qYhL2Q/OLgdI7+ivcnGR2Jy/8uAY3tNvTCNYigvc2KS4K9zcs4cG/QUvxi/agFJj nx8j3bfAb4IP4RQEzBbba0o27xrkKaH23X8CC27rTKAVckAMCcsg1kF8x3WAR+JdRLixau ZH4TIH7bJ4lLh1GyFVQPZHNT9cD04JUSBCOqNpXgxpqD7NPWLb80dsn8YhboE5QAiQodXN Rxg3ITVwynlV51mhxOSJ/eLLjB8xM9FgZOphbAJU6+19C/L5VKfkIV5cA3P5aA== From: Louis Chauvet Date: Tue, 09 Apr 2024 15:25:19 +0200 Subject: [PATCH v6 01/17] 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: 8bit Message-Id: <20240409-yuv-v6-1-de1c5728fd70@bootlin.com> References: <20240409-yuv-v6-0-de1c5728fd70@bootlin.com> In-Reply-To: <20240409-yuv-v6-0-de1c5728fd70@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 , rdunlap@infradead.org, 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 , Pekka Paalanen , =?utf-8?q?Ma=C3=ADra_Canal?= X-Mailer: b4 0.14-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=4941; i=louis.chauvet@bootlin.com; h=from:subject:message-id; bh=Ctv1MLMXYDKALnFrvVXqUApJNktccSvUqf8PTlsd3Vk=; b=owEBbQKS/ZANAwAIASCtLsZbECziAcsmYgBmFUHQwrnzUv6M1IvWqx0+WR0ga0Kukxl8T5kva PKZNehQWNGJAjMEAAEIAB0WIQRPj7g/vng8MQxQWQQgrS7GWxAs4gUCZhVB0AAKCRAgrS7GWxAs 4nwOD/wMs4iRxdi19yyIe8cJVIZFNbrOuM/Q/uMYdfrDV3EskEQMNAcHCgh0fH6/hEIP8TtQ1Hj uq/Es8EaqP5bkAQ6PSoSsesWR6DiVxwg6MeFO2rF8GyOH48ubVTibNg1LWu+Nd4ArLUsMgGENg8 v3zEKPWpGO0rxhtObELnwwfEMpHYlQnVIbwSsQVrl22t/awxShi2hK/znsVsDcF91kKjyd8uIyh jANLnFl8UDRG36AYEXO9ktONw9yAgNrkqmePLMuQ2hCupCxo2VynMAP275mhF2E2zhqhQybhDv0 srmbkzXeVZhEHlMrz3EjrCXkOxRoF+KdVoj/0HzXlkilkNvsdTp5LDM9/KNzLQOUyg9IiruAEWm iBO1Y5+wfnpyVgnqbsqElkyXmFTJu3aRuUyQ+teuvrOadT2ANeFWjkqzYC9q0cvBdxsquoQJrjs WWEqkDFWz9qizsVzzZua7b8XnLeZmPLNoiI9ObdaiS3hxW1C/GlrLkFjCr0rMMdNlFvLNfbPY20 IGdsmLenhtTDCOUP66iPNQn1ibNmSND+hM/hlf3Ov6613wf6cdegEuOWmc0TtFunRz0Ji8qnZ72 reLYPnPs8fJyIMWONqSrN0KnqtV5vMnqX8/ToO6BKG7JUqPSBBG6uUwjLunWD3AZBlUA1MWIFQc Kd0gBgBemYjlv0Q== 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. Reviewed-by: Pekka Paalanen Reviewed-by: MaĆ­ra Canal 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 | 8 ++++---- 4 files changed, 12 insertions(+), 15 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..5a8d295e65f2 100644 --- a/drivers/gpu/drm/vkms/vkms_plane.c +++ b/drivers/gpu/drm/vkms/vkms_plane.c @@ -117,10 +117,10 @@ static void vkms_plane_atomic_update(struct drm_plane *plane, 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