Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp929227pxb; Fri, 21 Jan 2022 06:30:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJxcBQT6FH26KvJQ8zeoxarAI7m+QwPBVOvCgL4ZWwWpjdNetsUal/TfDTgyQHaDM6xtgyR/ X-Received: by 2002:a63:3e84:: with SMTP id l126mr3118522pga.19.1642775410398; Fri, 21 Jan 2022 06:30:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642775410; cv=none; d=google.com; s=arc-20160816; b=UFvxZBfG6De1z8FkTJ2dI3EbH3MbAH5Zaq9HbJ6b77uyiDGkSy0Zj99vfA243ncOmQ lWFA9icswB3CPTslTyldinwPvZOJG0O784TaA3nwVXPekN93bHLrfYmnbFWzV8ZgTS86 37IO6slAdVnIJg+RgReMCvZOjozZ9seO63ApUAnSnKwDs6B3okEqTkEVUUf2YhiahjFP sGJoZGhcbwNeZqYIgSxBuejYwpU0qAto4sw9fwetlcFQ3v8Dz9fCdSMWWIGpeC0slrXD Dgyu7c5veo4R3x9Sod3WkLoD1YgDPt/ARZ5lTkQTphSbDDWb01FHyH9XWnZjmn8+vGOf Scuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=ghW/ul0d9NEyJ9r42fCrbuuKSEOCoJslPqejWSnYe4E=; b=YQ9DQ97fn1gSma+NCvNpk9ems/yJj4IbnCpgnXwDzttlEMFF2JWfMGmJX35nITG6/X RK4IpEhU3Z9hvDD9u2oWlWxPH7SQwzKJ70azpDHWZfsXXj1lDJCAs16PDbIR/+Fw3PGU d3aMXCvbBJIqglSHSdOv6qH+0UzDoXO/8tSBwaVlUvUwiPlxjYtToE+JwfY4WA69HW1n xuAxZrwGpxbIZsLc140mUX92sQqXBx2sdItJfyxOhd2+2i4RL/EfDxUudJumSSxm0UY/ fjaviA92vwUDn9ycVJOaedKbq2W7WoL/PIszezkYpCGw9JZaf8rMVA40o6G6lhWknMA6 tmow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@igel-co-jp.20210112.gappssmtp.com header.s=20210112 header.b="uPqM8B/A"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id mu18si12609983pjb.118.2022.01.21.06.29.57; Fri, 21 Jan 2022 06:30:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@igel-co-jp.20210112.gappssmtp.com header.s=20210112 header.b="uPqM8B/A"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348770AbiASCfe (ORCPT + 99 others); Tue, 18 Jan 2022 21:35:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238636AbiASCfd (ORCPT ); Tue, 18 Jan 2022 21:35:33 -0500 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 01C19C061574 for ; Tue, 18 Jan 2022 18:35:32 -0800 (PST) Received: by mail-pj1-x1035.google.com with SMTP id g9-20020a17090a67c900b001b4f1d71e4fso1156041pjm.4 for ; Tue, 18 Jan 2022 18:35:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=igel-co-jp.20210112.gappssmtp.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=ghW/ul0d9NEyJ9r42fCrbuuKSEOCoJslPqejWSnYe4E=; b=uPqM8B/AGjP0zEx3Jb1zSG/XQs3hDbbgpen5gl3SMQdeuniUTowERurn5OXzTAdvtd fRR1eFmNfr/L328KILrOZGgiISXNDYf/CYtmObLx+YvxxNpnFvTtDTBtXm1zKxDTtTFn FmCtJUT5ufM73Pc8tn8pVy7/45/n6mPTHu06ivs5vZrR2Uan/i/bNM/XUw+UZymsYMi0 kM+j5EyyQSO60NNsEg3qFLDqjZ4HHBYI7h07UqdQkJFoi/GsAK3ypsziUF4WOQY2b9t1 dVl3eg/PpJwmFGNOSlQkbTd10Kq3T5nfbK7BqVAsWZRV2w8nva5jJysJuEabEcuXp5WG UPFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=ghW/ul0d9NEyJ9r42fCrbuuKSEOCoJslPqejWSnYe4E=; b=eM4xJK0rLZ0oigE+RuXTgNXk/I8unG4AiVTUJIhHTmoM/gWkfakbzH3A5nKB4hhfU/ k/Cwy34QBA8jOutwevwi8al9jh6T9c2LjVIn6DlAIERaoHaiJtZcsBLzSELBnshYgjE/ vUueQEtqd66HwUPgSm2NJNBXbSJOELR8wKdmg+KidAIwV53RtGtHPBuHi8Lbl2jxW69Z RGsXYYwwX3jjmFXI5flQ8Teff/P+ByT1W7NEMMsAeaRI0wf+ecX+dDGRvZ9zP26uheyF NI1R/vPQv/Tjuko6+LfstwFrnBr4zK2IlfkqbJmOc17ou/MfCVzLtt73/qdGYqOyIkFn IHmw== X-Gm-Message-State: AOAM530Cpqja0FD6fo9fGhWur28/5gD3T8yOEPxAfkhBl1TNwKkPWaSQ GA24yTgAZAsvW2vXPL267AOWbw== X-Received: by 2002:a17:902:cece:b0:14a:73bb:e75 with SMTP id d14-20020a170902cece00b0014a73bb0e75mr30647215plg.115.1642559732396; Tue, 18 Jan 2022 18:35:32 -0800 (PST) Received: from [10.16.129.73] (napt.igel.co.jp. [219.106.231.132]) by smtp.gmail.com with ESMTPSA id d11sm18974996pfu.211.2022.01.18.18.35.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 18 Jan 2022 18:35:31 -0800 (PST) Message-ID: <94bddda6-9823-6479-bc1d-cbb8c1079877@igel.co.jp> Date: Wed, 19 Jan 2022 11:35:22 +0900 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [RFC PATCH v3 2/3] drm: add support modifiers for drivers whose planes only support linear layout Content-Language: en-US To: Andy Shevchenko Cc: dri-devel@lists.freedesktop.org, Alex Deucher , =?UTF-8?Q?Christian_K=c3=b6nig?= , "Pan, Xinhui" , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Ben Skeggs , =?UTF-8?Q?Michel_D=c3=a4nzer?= , Simon Ser , Qingqing Zhuo , Bas Nieuwenhuizen , Mark Yacoub , Sean Paul , Evan Quan , Petr Mladek , Sakari Ailus , Lee Jones , Abhinav Kumar , Dmitry Baryshkov , Rob Clark , amd-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, nouveau@lists.freedesktop.org, Daniel Stone , Laurent Pinchart , Damian Hobson-Garcia , Takanari Hayama References: <20220114101753.24996-1-etom@igel.co.jp> <20220114101753.24996-3-etom@igel.co.jp> <0cf405a1-0d2d-ed5e-abdf-be645e7a9209@igel.co.jp> From: Esaki Tomohito In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2022/01/18 18:53, Andy Shevchenko wrote: > On Mon, Jan 17, 2022 at 02:15:48PM +0900, Esaki Tomohito wrote: >> On 2022/01/14 23:16, Andy Shevchenko wrote: >>> On Fri, Jan 14, 2022 at 07:17:52PM +0900, Tomohito Esaki wrote: >>>> The LINEAR modifier is advertised as default if a driver doesn't specify >>>> modifiers. >>> >>> ... >>> >>>> + const uint64_t default_modifiers[] = { >>>> + DRM_FORMAT_MOD_LINEAR, >>>> + DRM_FORMAT_MOD_INVALID >>> >>> + Comma? >> >> There is no mention in the coding style about adding/removing a comma to the >> last element of an array. Is there a policy in drm driver? >> >> I think the advantage of adding a comma to the last element of an array is >> that diff is only one line when an element is added to the end. >> However since INVALID is always the last element in the modifiers array, I >> think it can be either in this case. >> If there is a policy, I will match it. > > Indeed, but there is a common sense. The idea behind (multi-line) definitions > that when next time somebody will add an element in the array, there are will > be: > > a) no additional churn (like in case of this patch, if the item will be added > at the bottom; > > b) an element that may not be added behind the terminator, which will look > weird. > > That said, the question is if the element is terminator one or not, if not, > comma is better than no comma and vise versa. > Ah I see. In this case, DRM_FORMAT_MOD_INVALID is terminator, so it should not have a comma. Thanks Tomohito Esaki