From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 99B36C433F5 for ; Wed, 27 Oct 2021 08:05:19 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 64CDE60F6F for ; Wed, 27 Oct 2021 08:05:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 64CDE60F6F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CDC2F88AD9; Wed, 27 Oct 2021 08:05:18 +0000 (UTC) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTPS id A13F188AD9 for ; Wed, 27 Oct 2021 08:05:17 +0000 (UTC) X-IronPort-AV: E=McAfee;i="6200,9189,10149"; a="230051346" X-IronPort-AV: E=Sophos;i="5.87,186,1631602800"; d="scan'208";a="230051346" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Oct 2021 01:05:17 -0700 X-IronPort-AV: E=Sophos;i="5.87,186,1631602800"; d="scan'208";a="497754318" Received: from smaharan-mobl.gar.corp.intel.com (HELO localhost) ([10.251.214.195]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Oct 2021 01:05:14 -0700 From: Jani Nikula To: Imre Deak Cc: intel-gfx@lists.freedesktop.org, Juha-Pekka Heikkila , Ville =?utf-8?B?U3lyasOkbMOk?= In-Reply-To: <20211027063342.GA2792152@ideak-desk.fi.intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <20211026161517.2694067-1-imre.deak@intel.com> <20211026161517.2694067-4-imre.deak@intel.com> <87y26fishf.fsf@intel.com> <20211027063342.GA2792152@ideak-desk.fi.intel.com> Date: Wed, 27 Oct 2021 11:05:08 +0300 Message-ID: <87mtmuj3kb.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Intel-gfx] [PATCH 3/3] drm/i915/fb: Fold modifier CCS type/tiling attribute to plane caps X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Wed, 27 Oct 2021, Imre Deak wrote: > On Tue, Oct 26, 2021 at 08:52:12PM +0300, Jani Nikula wrote: >> AFAICT there are no intel_plane_caps references anywhere after this, and >> it no longer looks like an enum, so perhaps it just shouldn't be an enum >> anymore? Just make them macros? > > There are other instances of bitfield enums in the kernel, but yes in C > there's no benefit of enums for this over the simpler macro approach. > Will change this. Semantically I think enums are good for enumerating and naming the bit *positions*, but not so much the shifted bit values. See e.g. enum drm_dp_quirk, where the values aren't important, but they're used with BIT() in drm_dp_has_quirk(). BR, Jani. -- Jani Nikula, Intel Open Source Graphics Center