Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp492916lqg; Fri, 1 Mar 2024 11:12:35 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUiBZPSXsWObgkhNZ8aqU9OrHXRTEO0wioQstfnFMb4O5acShifQk1QDivsGGoYMi4PjE0HkesqI5qC1BpzzqC6l+s+pWneo/j3Aaa1/g== X-Google-Smtp-Source: AGHT+IEuroNeUmeaCGwy2Qgy5iXvar3ceRyl+2dKUXVOGT3M4KyYpgAF4o8cvgM/ou2rFiN2WRgi X-Received: by 2002:a05:6a00:3c8c:b0:6e5:4b1c:770 with SMTP id lm12-20020a056a003c8c00b006e54b1c0770mr2866665pfb.6.1709320355208; Fri, 01 Mar 2024 11:12:35 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709320355; cv=pass; d=google.com; s=arc-20160816; b=OQDnC+O0WA2V5UoCQtiYd6iBwD1CBU5znaVGVTODwfSe1bc10/F7zFap3JKaB9sHiG 7H2QZ8I1dqgmD/Rc8S/73u5ptrpqMkMyOMrC4ePNZXc+YogEzCyy8g764XEehK967B+T mERIJQRWZbrRNjUv3LGJlbshL0AMFaBLvLPVOWUyLyzsMkLdNwqjXcxCD7hhIGs//uwm Jk9JTpx55kY8YYXJt/nJJITgPLoRKqayLOW96cv9LfZg2fasDtDW2jd9pyHqUows/lSa dLHTxHfQVgZx5kywEp43UV1KA+MGyJFr29acjY9rNbwMzAaQnPTkl6uBitIheJlBmayx sUtQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=4JsqcOQT5uTj4YDqIoZaW45y63qogS+fTSuq00oeJus=; fh=EJR4gGJyG8PqGJmm7zcfMRC+qRxz6HsEkz4USjbaN/w=; b=dIlOrvzZWgwsrJS+/2NrV+zgbjfBpJhfGT4LfmmLefV2EK4Tz0WviJstfvz+wAkCQz O0qDHTwCN0q2d48YXgAenbmVMAV6xY7LuB7OJAK00O/IYvLEJ5dWIdI2EfP9ssqoqGIZ l5UaryWOGrXNgWIk9znia4sRTM4kCuO9GAQ7hSuOPoWBJV1gfecqD9jJ0+zSbF5oWE4l koO8YGTVdNTT70PeUcbpBsBuwf1YaESprRSIdsK58LxkuiArJEIMpOmA5F/U9ctOM5yJ 6iX3BJsOmTFkDHpQKQ/lG8Kjo9zNkB0morIRoHFiUfzuJTVFesMTn6AfQH7aXw57odP0 9DJw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=ancud.ru); spf=pass (google.com: domain of linux-kernel+bounces-88997-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88997-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id r4-20020a63d904000000b005dc4c1f8c5dsi4146647pgg.579.2024.03.01.11.12.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 11:12:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-88997-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; arc=pass (i=1 spf=pass spfdomain=ancud.ru); spf=pass (google.com: domain of linux-kernel+bounces-88997-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88997-linux.lists.archive=gmail.com@vger.kernel.org" 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 B0377288286 for ; Fri, 1 Mar 2024 19:11:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1A43539FDD; Fri, 1 Mar 2024 19:11:32 +0000 (UTC) Received: from relay163.nicmail.ru (relay163.nicmail.ru [91.189.117.7]) (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 41A7E38DCD for ; Fri, 1 Mar 2024 19:11:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.189.117.7 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709320291; cv=none; b=AKqvCf7qNUnP0+zlLJMbuRtIbvsc8VlxbyFPIgaF3c8H9q+BmMWSYwRtwqw9AknTq6gkgZYLHqc1N886cMWm9t9LeIrWBHRgzXrAI8+Q7n8iWgnzgleUO19nDbo96k0zzTN8s5PwrLJkkhwR1mhRvkwB9JbxB2fCG2WqccJ/CXU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709320291; c=relaxed/simple; bh=3Nq+k+n8G/JV8Nia6Movo1ADaLHtyQXbtdFxIzcy60s=; h=Message-ID:Date:MIME-Version:From:Subject:To:Cc:References: In-Reply-To:Content-Type; b=Xwf5f423K4R/HrMmFJzKuLLMP085sjuR1/5BXL7/30OcmRJq6qpysb5BYFrhpwA9I8riaZi5B8PePk1W59Qv/Z3pzxbXnVrc4HM2wgAFf0X5U8vMrQkCG6IyrctcHZBZZnyo+Zy6AeIwXZD2S9Z4R7WZLag1N0QKFwl2dNobLaw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ancud.ru; spf=pass smtp.mailfrom=ancud.ru; arc=none smtp.client-ip=91.189.117.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ancud.ru Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ancud.ru Received: from [10.28.138.152] (port=9840 helo=[192.168.95.111]) by relay.hosting.mail.nic.ru with esmtp (Exim 5.55) (envelope-from ) id 1rg83n-0005PA-BC; Fri, 01 Mar 2024 21:56:43 +0300 Received: from [87.245.155.195] (account kiryushin@ancud.ru HELO [192.168.95.111]) by incarp1104.mail.hosting.nic.ru (Exim 5.55) with id 1rg83n-00A9hx-1J; Fri, 01 Mar 2024 21:56:43 +0300 Message-ID: Date: Fri, 1 Mar 2024 21:56:41 +0300 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Nikita Kiryushin Subject: Re: [PATCH] drm/i915: Remove unneeded double drm_rect_visible call in check_overlay_dst To: =?UTF-8?B?VmlsbGUgU3lyasOkbMOk?= Cc: Jani Nikula , Rodrigo Vivi , Joonas Lahtinen , Tvrtko Ursulin , David Airlie , Daniel Vetter , Manasi Navare , intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org References: <> <79c92cfa-cf5a-4a23-8a93-11c1af7432fc@ancud.ru> Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-MS-Exchange-Organization-SCL: -1 On 2/29/24 15:30, Ville Syrjälä wrote: > I prefer the current way where we have no side effects in > the if statement. > This seem like a valid concern from readability and maintainability standpoint. My patch was aimed mostly at performance and maintainability using tools: some more pedantic analyzers are sensitive to non-checked return values (as of now, drm_rect_intersect is ignored). Would it be a better idea to make an update to the patch with second drm_rect_visible call changed to an appropriately named state flag set with drm_rect_intersect result? BTW, the original patch somehow got mangled while it made its way to the patchwork: source list line in patch got broken, which permits the patch from being applied (the original version did not have that line break). Any ideas how to prevent this happening with the second version of patch (in case the idea is viable)?