From patchwork Mon Mar 4 15:28:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Louis Chauvet X-Patchwork-Id: 209582 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:fa17:b0:10a:f01:a869 with SMTP id ju23csp1495495dyc; Mon, 4 Mar 2024 07:30:31 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVYBF+RM+sQrbVhIrtwUrcamxvrLwuNdxLvWuSIPp1VWlgCqdNIDa6Wpw5tnC+G9+wChiX5tXbgOqwO93pnIrzfkKjtVQ== X-Google-Smtp-Source: AGHT+IF/LRpVeqYlhbTHhoMFF8p46A1LgwbMu6FjB7O2lyWiekWrRc4CiQdU5CbUDgfLXqo6N85f X-Received: by 2002:a05:6102:2857:b0:472:61b0:64a9 with SMTP id az23-20020a056102285700b0047261b064a9mr7035825vsb.5.1709566231209; Mon, 04 Mar 2024 07:30:31 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709566231; cv=pass; d=google.com; s=arc-20160816; b=siMyHy80X1HBNiw5H3g2dSUtsQ20Yjq7hJLiemSAYmJvaq1bahe9MKHrWqCD9qOgWX H25OV0TApJfDwNlo7bWZkWU+iLW7b6ECCWqZ4yH5UIe8Y5a20sRQLrXFhUl6V2NH1nII j9jHGQi/zx+SqUl9QsJQNntR8KGmpBnMZtofi41fDgRglHuh2bSJwgzZAdT7D7i47E9u m0HVk2PT3Y9zzEnv43KVNewSGwV+JwZyLXCyJl1A0Dm3SgLURu/XhbwVkj3UcxCrWmHU bvacSX4HUnJuEo7TZUC8pDTC4dHUTfQBrMV3npsG8hsggHTu1Okgd00PPkOVeBaeJz/f 3CZQ== 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=hht86WDYBmmd5HJ0kBTByD9xXyq+2Qqfx093Hdq4g/E=; fh=I1mDzpQ2i/fckVIeMd+WKWb14s85mMQWc3/wF4wbFPI=; b=JWX4cJboMdUJ6JaUVbBgoXCeRjzgaNonnryoudWQR6Iq52yQd36IvTWULthaT3rsfq 3oQUK4gXzzuz+pMFA4kpyoXZvivKBqaz9eBJQP+V9UexBjik0fNufbyhx7jJnj5yLeIL ubC6Q+/LhCanB+MLDC5v2dayCGav8KFzAZIrKY0N8gK4gsNHMO8LvP69ISYlAn9BwQms LjL9vXsxAAJ6+LXtcWDsmxsMPiUGoylz5McSvCp6HwwRTYTn70R5DFkvAMuIDoLQnXGn /Px4J6Ek16MhSjLW5jlkgU5/CGNfSzyKunzJoTY70u+I2q2GhsiSXsbOfh35R1YRWJiS 1vxw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=YvXwNrLG; 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-90821-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90821-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id bf4-20020a0561023a6400b00472bd050031si358599vsb.232.2024.03.04.07.30.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 07:30:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-90821-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=YvXwNrLG; 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-90821-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90821-ouuuleilei=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id E68BF1C223E9 for ; Mon, 4 Mar 2024 15:30:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2995E4CE04; Mon, 4 Mar 2024 15:29:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="YvXwNrLG" Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) (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 6411348CDC for ; Mon, 4 Mar 2024 15:29:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.197 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709566164; cv=none; b=OV/oIl66JWRsijvZib9rf30txdCofHPp1YkVR051W5y+vCnxIdP82cAcxeORqDqlN1OasP4IWnt+QT9KrJUL7D3TVvioJGqsNalrExkLzva27bGQAgJf+HRpic9fNp83qSHKluxZ8YigfH/uE6QXOEQk9yhbSO7SmR6XN55gdns= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709566164; c=relaxed/simple; bh=jQLWVvGHX0RwVHU0wEm+ZMMYBxMzOtg605EU0kzKs58=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=kThzqp5OxHUfCxrAZCGVyB1fMUAWZ/i+YnU+a4L0wjfBmJz0/3YTm7d8A2URqZlvfIDwdfQsK54TqODBGWgsXbwB52vfmpViSuizU8KvCm498rIVWcoUGlW9feoCKIZ7clHfaijh1pceeKQPsq2vSIx3c08FmW4AGEzmTpi/emg= 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=YvXwNrLG; arc=none smtp.client-ip=217.70.183.197 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 88B1A1C000F; Mon, 4 Mar 2024 15:29:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1709566160; 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=hht86WDYBmmd5HJ0kBTByD9xXyq+2Qqfx093Hdq4g/E=; b=YvXwNrLGXkufDCSG+1XjivYgxRnZjO9WG5OVZyqWdr5kzrL5jzdzABr5ve8GgEIQ+hwzlj TVx0ma4pNURIECzev+kqR9bljSpKP/3KS7VL3GyaiwVi9oChl4Ys8uI7Lmj8SziVKRtYa8 f3owFq+RJU+6ZcrZji67FsRScvm2ciVN8CRpaiMs++ZXbDSKTMoFhZ1p3P9bhhyRtXV9FJ TMlK2d6L9dn+8Y/hkW62vDu7+gK3iuJyCOl1S6f5bJc3F3DBPuVgmDJvQgbqGnU94dBqtM f/HXL9T9OjN3iKNE9l85BB2WQfWUnZIqz4SDus3/kTK53e4N7kXUv8hJWz5qyw== From: Louis Chauvet Date: Mon, 04 Mar 2024 16:28:06 +0100 Subject: [PATCH v4 01/14] drm/vkms: Code formatting Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240304-yuv-v4-1-76beac8e9793@bootlin.com> References: <20240304-yuv-v4-0-76beac8e9793@bootlin.com> In-Reply-To: <20240304-yuv-v4-0-76beac8e9793@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=4834; i=louis.chauvet@bootlin.com; h=from:subject:message-id; bh=jQLWVvGHX0RwVHU0wEm+ZMMYBxMzOtg605EU0kzKs58=; b=owEBbQKS/ZANAwAIASCtLsZbECziAcsmYgBl5ejK1tq0FPOONhLa7oiPVFP5e5ONc2D4XjhIBYjj LqPK5VSJAjMEAAEIAB0WIQRPj7g/vng8MQxQWQQgrS7GWxAs4gUCZeXoygAKCRAgrS7GWxAs4i8YD/ 9ohvqFBW5bdZZumjj4YbMovv6fQpS1NnYUDRGRpnMu5nnO14iFhNJU+HdJ8SZg+AauL1kDsb9SD/uJ mPYFPwZowGawDXo3x9iiCIm/BjkV7nz+FHs7BSExvoOhFRUGeSd+M78DKtNkbDxe8pIgSIWLC7tuSd 2ZH97rfVtxHXXCQKReCMxJ4UYNxjuGNph29K8IxS9mE/i4WrHwp3DDsoDO0VkLWvcZra5C/JoNse8I NOna9vr8b09/1+JoyjQDzuGyOGGIGtBAGuhZLeL/7N7poU+x9NNXFjEcMbT4See5J6Eyeo+1zDV9vg jIPh4Dzx3R/+y/8lR3g7YMb86+YqEUbpjw1iJTfkr7C8bjeKa5XKSgCxyrmAZdIKMmMgmm/WZmmiEm Ma6aTBo6yGVehgNhcZrtLmRZEfE0eX6FrkcfdiNW0F23O/xPWjJnUADYjvI+j6UGNBNRAtPBoeBZtF d0YR7TXKd9iUBrM+sFivFn5tlySZWH3/ypZhdYmRNTGsW6hCrJoZQWWDDiGXVqxJjgaVy8FXvC7rVw /BYoTF+ogBO/OJNXeWxPSTGzOXquGlLJ6LhbanIXIrm1tHywcLCNDPY70dBb2pCqpn/zIbYetcHhcW lZcUCI0VRmgITIDSI7kdpmqoNR/XyOnR71jFrn6yo3AR2wvhxM1eC9htd9PA== X-Developer-Key: i=louis.chauvet@bootlin.com; a=openpgp; fpr=8B7104AE9A272D6693F527F2EC1883F55E0B40A5 X-GND-Sasl: louis.chauvet@bootlin.com X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792610120469339700 X-GMAIL-MSGID: 1792610120469339700 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 | 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);