Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp1879257rdb; Mon, 8 Jan 2024 13:24:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IG7sOsAVm2pRyCEPPGvxoDWj8OhxTxotV1Zh5550EsntGks21kaY4/x0kWRMHi2vE+dekvB X-Received: by 2002:a7b:cc88:0:b0:40e:4daf:b73d with SMTP id p8-20020a7bcc88000000b0040e4dafb73dmr115652wma.169.1704749072765; Mon, 08 Jan 2024 13:24:32 -0800 (PST) Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id j25-20020a170906411900b00a28c3ea4e6csi221078ejk.500.2024.01.08.13.24.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jan 2024 13:24:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-20126-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=@intel.com header.s=Intel header.b=FvnZoQBf; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-20126-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-20126-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.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 5BECA1F23987 for ; Mon, 8 Jan 2024 21:24:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 39B6656455; Mon, 8 Jan 2024 21:24:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="FvnZoQBf" X-Original-To: linux-kernel@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.43]) (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 7E8835644C; Mon, 8 Jan 2024 21:24:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1704749056; x=1736285056; h=date:from:to:cc:subject:message-id:references: content-transfer-encoding:in-reply-to:mime-version; bh=w1bZCtgTVwS6/KT5MbLDsjOQ19c1Rd8mDPKhQ5jRdpk=; b=FvnZoQBfdtGtFTI/v3tdM0LtbYhXvbfVUXHp3x1etji4EaXYXTLOIjG3 PIeq52v/zk8RZza37Gp+IQLfmOL4CJYlPmAjOuFbwfo+KArgwZjV3LEhF di4U8TQRjL76ew3S+G+sbe9Ldyr+G67Qed2jY8s0v2ckwNDt1fZ7YtHie u/FHU2A1TQhVHUSkEZseGPS237UUFSoSuYZW77Fx1strhRd/uDXxWIQFv 1giT2vb/pGksWAqamNViuc3ZryMxMekDmT04guU4GhLBBT6Obp0SPpaFn yG66XErtOW5t9mSfLZtj2EJxWEHNRs2vFJphFJG9fdqiSSWQgpSSfYapu A==; X-IronPort-AV: E=McAfee;i="6600,9927,10947"; a="484188138" X-IronPort-AV: E=Sophos;i="6.04,180,1695711600"; d="scan'208";a="484188138" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jan 2024 13:24:16 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10947"; a="815734236" X-IronPort-AV: E=Sophos;i="6.04,180,1695711600"; d="scan'208";a="815734236" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orsmga001.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 08 Jan 2024 13:24:15 -0800 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Mon, 8 Jan 2024 13:24:15 -0800 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Mon, 8 Jan 2024 13:24:15 -0800 Received: from NAM02-BN1-obe.outbound.protection.outlook.com (104.47.51.40) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Mon, 8 Jan 2024 13:24:15 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bDxRXclbpCKQ1jv2AW8SKkouRRgqj5c87tyBxm3ocwFApX8UhIn+K3J8iKa0nbYRwxsXebBbscESrWzYRSPo1dVWRcfCGiZH8jCvzl0Wx7CulC5v0+aBPUVBqF8sfCCc/zUvYHsPWG+CTMEw3atvwqcmoETgXTeIdN8TzffGFyvhRQ9UTMlvKbAOd0FvWTWwC4KQUDDFx/R8ZK0nUYpH57TevDrnMSx7/nzq9LqM/RbFHmandl6Tg6cHWksYAOiNJITdFQd4D8g0on5SBwLnjvbTQtVubRUKcoLCChbT8wc3umU2Zg9/7uvKNVIylRscSkmoB+8dYx+K3h0w7zejHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=lasIAx2FZHpYhebXF5w/8Z9aBlIpIGh/J/GvFMftw/E=; b=HowvIQK9vkSCUPhk6QNrV+LHPXCbOt6D0rozfA/baX2FX0aBLFlCuToseBGqPPANgN5wBsuYwblu4eM8lIsAevhJ+Yupy51UDpuOHDbYCCQZZJJK/6uhGNwJUk7kQ3W4P5oLyp3lSlWmA7cjea6cnBBQ5jmgBm9fKIghxK3j15QcufZJHzcrvXs2cpyxmpqJ0mdL6pCg4Du4luBaatbbzXHF6a6ejmcpNdImbbvfSVQK/7xuf+n4Pc1SupfCZm6EhyQtLFHpF1oYUVjOndP259XlWXCWiNmtX0Rdz3glbMFdWM2VJJMCg3VclhnMJOahRATsjQpMTA0ROoQfGfX7/g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from CY5PR11MB6139.namprd11.prod.outlook.com (2603:10b6:930:29::17) by DS0PR11MB8051.namprd11.prod.outlook.com (2603:10b6:8:121::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.23; Mon, 8 Jan 2024 21:24:12 +0000 Received: from CY5PR11MB6139.namprd11.prod.outlook.com ([fe80::b870:a8ae:c4f1:c39b]) by CY5PR11MB6139.namprd11.prod.outlook.com ([fe80::b870:a8ae:c4f1:c39b%4]) with mapi id 15.20.7159.020; Mon, 8 Jan 2024 21:24:12 +0000 Date: Mon, 8 Jan 2024 15:24:06 -0600 From: Lucas De Marchi To: Michal Wajdeczko CC: Dan Carpenter , , , , Maxime Ripard , "Thomas Zimmermann" , Rodrigo Vivi , Subject: Re: [PATCH] drm/xe: clean up type of GUC_HXG_MSG_0_ORIGIN Message-ID: <7vb3ql7z5dac3kwo7nhibh5al7wemt45ibzuyk4bpyzpltzjml@go7rtyq4m6hq> References: <84a5c289-e2f6-4e30-a093-5a1c5b335057@intel.com> Content-Type: text/plain; charset="iso-8859-1"; format=flowed Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <84a5c289-e2f6-4e30-a093-5a1c5b335057@intel.com> X-ClientProxiedBy: BYAPR03CA0002.namprd03.prod.outlook.com (2603:10b6:a02:a8::15) To CY5PR11MB6139.namprd11.prod.outlook.com (2603:10b6:930:29::17) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY5PR11MB6139:EE_|DS0PR11MB8051:EE_ X-MS-Office365-Filtering-Correlation-Id: 9fcbb7e8-48f1-4878-b02d-08dc109028d8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0ByIXKWLc6CUAiAyh/fAg01zyFDY9T8EbJSMzSoJrhMGQDjHk1mHy2FOXsl91aKgps9hpnwFT9P5wPnvx2NgX0BiFJ/vFs1bz86JCuBTQTCNuno9vNdWwLhDhEN2O3QwN6LzfMuxD4hvTjeamfxUsxvAabsSNxS8FmNNUlFIopA2B3gEi3RWyyxU0Bp2e6gz2OVAF3q9ElFn1wePQWgNb6hAIbQ/eba96d/MvXE8aiK7DRzf91cgBC8dJxYxw1i26nobQ/4TX6Mkd3kP0LGm/+eMiaRX+ZhIA2h8A6ySLBXcs+EVLvOb0pej0fDhzGeup0BBD7+RzoJ6Rlo3oQeN15H918YNvZMci3cgmBio3E/jzU5vL6aZxsQPxNp03bbLdv0YLGC1JUwKQXjOe/+FfSVbkHWjCEesc2ySAIwQwpy8W27J0ssTsFusOro50rFVnsCmwD4VZkTNUW+Sp4w6gRpAsh37fNHlBmUbP20lF6/RXBpiM9WosvkJ2E2y5P7RitkjnffW979LXHK/q6BQvtEdGcCT6vPN6KN51Gq8mK2UqiOm7CUmLN1yNr46yEt9 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CY5PR11MB6139.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(7916004)(136003)(396003)(376002)(346002)(366004)(39860400002)(230922051799003)(451199024)(64100799003)(1800799012)(186009)(82960400001)(33716001)(8676002)(8936002)(38100700002)(54906003)(316002)(5660300002)(6862004)(4326008)(478600001)(83380400001)(6636002)(6506007)(9686003)(6512007)(6666004)(26005)(66556008)(66946007)(66476007)(6486002)(41300700001)(2906002)(86362001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?iso-8859-1?Q?8154ZlYi6YIG5M5rZfvxIg+50oRFGQvkxja0lUS46JORKbacVmae9rLsyo?= =?iso-8859-1?Q?nxa9sfsv6zpOWOLUDkeo2AT1eK0Sd9I3qGYUE4X02lGTdWWm4iEkbyEDzz?= =?iso-8859-1?Q?TRZ8LKrU7m7a/8ZsDx5bP292+KD35nsFFWRroTyLaERC3gwFjiTRMmrUWR?= =?iso-8859-1?Q?HHz9I3Rj6IjwVGiDdrC9w0snBtTaYiPdc05lEDhW1FaJlbkf1AME8vgSnB?= =?iso-8859-1?Q?4FNVXbk8p0RMhg1oA39XoevARS1/IwmO7o7IBlB5ypd4FLvOmts7vLG1Zy?= =?iso-8859-1?Q?eLRyC4V5yUthHrmQGCdcNy6DTEm2RelNwItJDO/minZcuJ+XEHCnMklrn+?= =?iso-8859-1?Q?5JYrAasVKFkw1PhL3tePk/W09+vFAVEi9XO2ATtNHpU4tXL3PmlubMtndj?= =?iso-8859-1?Q?ehDlm9IOEk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e+Ppa/i31njQ?= =?iso-8859-1?Q?Jwh8JZMGWuyQF1XHGVHfSs2kuHbsCPU8vgQsRQ9WrcIdUyMDUGux01SfO1?= =?iso-8859-1?Q?U3+DrchV0hCUmAwRQnEo0XX0Jm8m4+ZQk/A1JDag1UwFJtU5fpQBX8j6oM?= =?iso-8859-1?Q?7kXAhr8W90Fcp9DyWDHkaENdsHJnYgBq35NB9adeCG9W0sYUZJtv3dFkui?= =?iso-8859-1?Q?8qewxDdVuMvxnZul1zGwDJwDRJdIRoLR+LP9sv03fgcKHE0q8fvz1Z020h?= =?iso-8859-1?Q?gRptReC3LoM/IeU00rPv2NHMd7NaZaMZX/3NP0V2XhYDRUZ6ShVzKWAYiR?= =?iso-8859-1?Q?qKqx2TChHzlWaDNLST8WIctcMyNwxl4EJmD44/7QsXO5aS64lXReFfAg?= =?iso-8859-1?Q?=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 9fcbb7e8-48f1-4878-b02d-08dc109028d8 X-MS-Exchange-CrossTenant-AuthSource: CY5PR11MB6139.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jan 2024 21:24:12.8299 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: liggtMur+9K9iq3hyZl3wLaVGLrtiZVrUkZirDefq2GEcf6Dr8P+xY4rSTk49/JoaQ+Xccfgfp8flmeo28sbolz2n/UPr6jvbaupZEXpjUk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR11MB8051 X-OriginatorOrg: intel.com On Mon, Jan 08, 2024 at 09:46:47PM +0100, Michal Wajdeczko wrote: > > >On 08.01.2024 15:07, Lucas De Marchi wrote: >> On Mon, Jan 08, 2024 at 12:05:57PM +0300, Dan Carpenter wrote: >>> The GUC_HXG_MSG_0_ORIGIN definition should be unsigned.? Currently it is >>> defined as INT_MIN.? This doesn't cause a problem currently but it's >>> still worth cleaning up. >>> >>> Signed-off-by: Dan Carpenter >> >> it seems there are a few more places to change to follow what was done >> in commit 962bd34bb457 ("drm/i915/uc: Fix undefined behavior due to >> shift overflowing the constant"). >> >> +Michal >> >> Could we eventually share these abi includes with i915 so we don't >> keep fixing the same thing in 2 places? > >it should be possible and I guess we should plan for that while >discussing all this new xe driver... > >anyway, what about creating new intel/ folder under drm/ ? include/drm/intel/? > > - drm/intel/include/abi > guc_actions_abi.h > guc_klvs_abi.h > ... > >the only question would be what prefix should be used for macros: >just GUC_ or INTEL_GUC_ or XE_GUC_ ? if using a intel/ dir, probably better with INTEL_ prefix > >then we can also think of creating library with common helpers for GuC >(for encoding/decoding HXG messages, preparing ADS, reading logs, etc) with the other differences we have, I don't see much benefit, particularly as it won't change for i915 wrt supported platforms. > >btw, we can also consider sharing register definitions: > > - drm/intel/include/regs > xe_engine_regs.h > xe_gt_regs.h > xe_regs_defs.h same as above, I don't think it's worth it as xe will keep adding to it and it doesn't care for all the previous platforms. For those files we may eventually autogen them like done by mesa. Lucas De Marchi > >Michal > >> >> Lucas De Marchi >> >>> --- >>> drivers/gpu/drm/xe/abi/guc_messages_abi.h | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/drivers/gpu/drm/xe/abi/guc_messages_abi.h >>> b/drivers/gpu/drm/xe/abi/guc_messages_abi.h >>> index 3d199016cf88..c04606872e48 100644 >>> --- a/drivers/gpu/drm/xe/abi/guc_messages_abi.h >>> +++ b/drivers/gpu/drm/xe/abi/guc_messages_abi.h >>> @@ -40,7 +40,7 @@ >>> ?*/ >>> >>> #define GUC_HXG_MSG_MIN_LEN??????????? 1u >>> -#define GUC_HXG_MSG_0_ORIGIN??????????? (0x1 << 31) >>> +#define GUC_HXG_MSG_0_ORIGIN??????????? (0x1U << 31) >>> #define?? GUC_HXG_ORIGIN_HOST??????????? 0u >>> #define?? GUC_HXG_ORIGIN_GUC??????????? 1u >>> #define GUC_HXG_MSG_0_TYPE??????????? (0x7 << 28) >>> --? >>> 2.42.0 >>>