Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp722072rdf; Tue, 21 Nov 2023 14:59:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IGdWBtX20K0fM+JbxViD3hk5SHoZ92gRCwLT9Vx29XRe8UDcEgMLnP8vaN8V2Cnqyq3WOYo X-Received: by 2002:a17:903:2443:b0:1cf:5c9c:7979 with SMTP id l3-20020a170903244300b001cf5c9c7979mr632537pls.42.1700607557683; Tue, 21 Nov 2023 14:59:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700607557; cv=none; d=google.com; s=arc-20160816; b=fLEqVQBPWkmtuY8gTo29pzkhL+jnhhskIyxTyekBsN7bjNdFpvvZsk6TelG2c/RtzR 5X4CXPQLpr6ZfOYVAjhiukW7bjygb8BZs3sktnQNk+/BIeBvaibnlWOYDVNIczXpskNO /pSeauodPw51PBkms1LJKsOqtTc474XMxiSF23R+g/bVReL9124oNYpPWizT8Z31dhfj UmeEAUdfTOsj5rKkiHsZzoxN56l575G12JgGNIeTrJ22HPT43xLFNb/k0p7BjVAnS3dm Pwj56FCkDPkyZxpIB3VhzBRCMv2KSC0KLh3ttavxN+GD3kJBa3hcVKsvLqKOGjacEQUD Pf8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=VvsEAsvFJCAuzTkOhawjNcVDzfJqg2jxoNzCw1vuYxM=; fh=qpsc1fMcxzVQxdyRIIW5VnLFfXF59qPjVU/NuZ8M8BM=; b=r5d/LkJSbI5KB/GkHoa34JRoMorqcQAGcwzZWjcl+5l1MHsWSVljvD3SACITqS+HVf 13kAt+2oEg+4GkBK/maG2ZshLIQSfWY4h7uceM4RVbLBCdxZPt4e1kEJwb7IUAadhQoS Mg/0oNBFNMF5YG8mNtfIwdcy7Xv+YmuYBYaMZUgsU4UVdl84GV7jQfkQh7+Bhnb+FSr8 Ea+OREZbjvGDGT/CI8Febrl5wIo5jI+NaOBMqoFFoc39rDPTipNUwx61ecO/EbD7MXZ9 6dHI2zM7HKBuSxUVWQ22G2PwIJE9DAn9tv1q5orZQekgGRHtN+85fv0sEzUDaUpLIbYx a8Mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Yp9JIov+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id a21-20020a170902ee9500b001cb02e6f149si10932749pld.538.2023.11.21.14.59.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 14:59:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Yp9JIov+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 7CDEE80658E6; Tue, 21 Nov 2023 14:57:07 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234767AbjKUW5C (ORCPT + 99 others); Tue, 21 Nov 2023 17:57:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229707AbjKUW47 (ORCPT ); Tue, 21 Nov 2023 17:56:59 -0500 Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [IPv6:2607:f8b0:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F4CFBB; Tue, 21 Nov 2023 14:56:53 -0800 (PST) Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-1cc29f39e7aso40274025ad.0; Tue, 21 Nov 2023 14:56:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700607413; x=1701212213; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:from:to:cc:subject:date:message-id:reply-to; bh=VvsEAsvFJCAuzTkOhawjNcVDzfJqg2jxoNzCw1vuYxM=; b=Yp9JIov+wo0DTDXoobNFWkySiptxCV3/DkKvymOHb/eK6z6/I5CB6en5pHK3b4G6pm xRunPR/DDdojptiJz5F1r2OyrhmOIG1hB/uSfPGyySZhphmtrOpzByjwpsiznR4cSKX5 zf1LR910qlKxYv2fG3k7aWNG302y0xH3ZC7M6oatdtQm7FQA24VyrVQAAay3ALIVVbE/ ivS82PbhCpc5Rrft5W7SC3TVj9I+lNWx5b9ywoDc7xXj8DBvQIvfhOp53YMSWbo7bMNI aKfK0+N3cIq4Pny7xnfznm3j0PiywWAXHYaz/OOy+FWwslRj7dNEz74hP4h9euWM2IpK YDPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700607413; x=1701212213; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=VvsEAsvFJCAuzTkOhawjNcVDzfJqg2jxoNzCw1vuYxM=; b=EZZ+vQFdtvMuAfpLGQ+PiLGwO7rF8TJ4I6+GoOAtsbcc0B7Jy6fPCxljTnND2PEcgr WnygRDpYLZcw8KUhtSQ8XMFoctyTOwdx7J+fdM/Q2y0r7ii9ZgeBodijfhh8XDNi397A dAkDfvZ7PVgYeIcz34QADZXyC3XAEpaN1wiqBS2DiiRyUemLss52yRIkbcVjMahz1+Na 6WAWr41T8jk9U4Smu2sh6qBJfVj5JCwOddjl05SvhwCioq3/5OGDAh3StFSU1cxCWu2b N5yYBXmNhS16pNPCFQSlw7KeukX4oDq1bUSKOijD3XXrmLLycKsSFF6tuorTjYKF/Ca8 7kDQ== X-Gm-Message-State: AOJu0YwFpLGEnvY01HBQk8MTTjRuldcxVG8XEkccbnkkPneFK9JRr13Q 3v639ajHIChQv0mKs4T/TxfIBWfeqPI= X-Received: by 2002:a17:902:d346:b0:1cc:3932:4a87 with SMTP id l6-20020a170902d34600b001cc39324a87mr588713plk.56.1700607412734; Tue, 21 Nov 2023 14:56:52 -0800 (PST) Received: from bangji.hsd1.ca.comcast.net ([2601:647:6780:42e0:7377:923f:1ff3:266d]) by smtp.gmail.com with ESMTPSA id m12-20020a1709026bcc00b001cc47c1c29csm8413189plt.84.2023.11.21.14.56.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 14:56:51 -0800 (PST) Sender: Namhyung Kim From: Namhyung Kim To: Arnaldo Carvalho de Melo , Jiri Olsa Cc: Ian Rogers , Adrian Hunter , Peter Zijlstra , Ingo Molnar , LKML , linux-perf-users@vger.kernel.org, David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , dri-devel@lists.freedesktop.org Subject: [PATCH 01/14] tools headers UAPI: Update tools's copy of drm headers Date: Tue, 21 Nov 2023 14:56:36 -0800 Message-ID: <20231121225650.390246-1-namhyung@kernel.org> X-Mailer: git-send-email 2.43.0.rc1.413.gea7ed67945-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 21 Nov 2023 14:57:07 -0800 (PST) tldr; Just FYI, I'm carrying this on the perf tools tree. Full explanation: There used to be no copies, with tools/ code using kernel headers directly. From time to time tools/perf/ broke due to legitimate kernel hacking. At some point Linus complained about such direct usage. Then we adopted the current model. The way these headers are used in perf are not restricted to just including them to compile something. There are sometimes used in scripts that convert defines into string tables, etc, so some change may break one of these scripts, or new MSRs may use some different #define pattern, etc. E.g.: $ ls -1 tools/perf/trace/beauty/*.sh | head -5 tools/perf/trace/beauty/arch_errno_names.sh tools/perf/trace/beauty/drm_ioctl.sh tools/perf/trace/beauty/fadvise.sh tools/perf/trace/beauty/fsconfig.sh tools/perf/trace/beauty/fsmount.sh $ $ tools/perf/trace/beauty/fadvise.sh static const char *fadvise_advices[] = { [0] = "NORMAL", [1] = "RANDOM", [2] = "SEQUENTIAL", [3] = "WILLNEED", [4] = "DONTNEED", [5] = "NOREUSE", }; $ The tools/perf/check-headers.sh script, part of the tools/ build process, points out changes in the original files. So its important not to touch the copies in tools/ when doing changes in the original kernel headers, that will be done later, when check-headers.sh inform about the change to the perf tools hackers. Cc: David Airlie Cc: Daniel Vetter Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: dri-devel@lists.freedesktop.org Signed-off-by: Namhyung Kim --- tools/include/uapi/drm/drm.h | 20 ++++++++++++++++++++ tools/include/uapi/drm/i915_drm.h | 8 ++++---- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/tools/include/uapi/drm/drm.h b/tools/include/uapi/drm/drm.h index 794c1d857677..de723566c5ae 100644 --- a/tools/include/uapi/drm/drm.h +++ b/tools/include/uapi/drm/drm.h @@ -1134,6 +1134,26 @@ extern "C" { #define DRM_IOCTL_MODE_PAGE_FLIP DRM_IOWR(0xB0, struct drm_mode_crtc_page_flip) #define DRM_IOCTL_MODE_DIRTYFB DRM_IOWR(0xB1, struct drm_mode_fb_dirty_cmd) +/** + * DRM_IOCTL_MODE_CREATE_DUMB - Create a new dumb buffer object. + * + * KMS dumb buffers provide a very primitive way to allocate a buffer object + * suitable for scanout and map it for software rendering. KMS dumb buffers are + * not suitable for hardware-accelerated rendering nor video decoding. KMS dumb + * buffers are not suitable to be displayed on any other device than the KMS + * device where they were allocated from. Also see + * :ref:`kms_dumb_buffer_objects`. + * + * The IOCTL argument is a struct drm_mode_create_dumb. + * + * User-space is expected to create a KMS dumb buffer via this IOCTL, then add + * it as a KMS framebuffer via &DRM_IOCTL_MODE_ADDFB and map it via + * &DRM_IOCTL_MODE_MAP_DUMB. + * + * &DRM_CAP_DUMB_BUFFER indicates whether this IOCTL is supported. + * &DRM_CAP_DUMB_PREFERRED_DEPTH and &DRM_CAP_DUMB_PREFER_SHADOW indicate + * driver preferences for dumb buffers. + */ #define DRM_IOCTL_MODE_CREATE_DUMB DRM_IOWR(0xB2, struct drm_mode_create_dumb) #define DRM_IOCTL_MODE_MAP_DUMB DRM_IOWR(0xB3, struct drm_mode_map_dumb) #define DRM_IOCTL_MODE_DESTROY_DUMB DRM_IOWR(0xB4, struct drm_mode_destroy_dumb) diff --git a/tools/include/uapi/drm/i915_drm.h b/tools/include/uapi/drm/i915_drm.h index 7000e5910a1d..218edb0a96f8 100644 --- a/tools/include/uapi/drm/i915_drm.h +++ b/tools/include/uapi/drm/i915_drm.h @@ -38,13 +38,13 @@ extern "C" { */ /** - * DOC: uevents generated by i915 on it's device node + * DOC: uevents generated by i915 on its device node * * I915_L3_PARITY_UEVENT - Generated when the driver receives a parity mismatch - * event from the gpu l3 cache. Additional information supplied is ROW, + * event from the GPU L3 cache. Additional information supplied is ROW, * BANK, SUBBANK, SLICE of the affected cacheline. Userspace should keep - * track of these events and if a specific cache-line seems to have a - * persistent error remap it with the l3 remapping tool supplied in + * track of these events, and if a specific cache-line seems to have a + * persistent error, remap it with the L3 remapping tool supplied in * intel-gpu-tools. The value supplied with the event is always 1. * * I915_ERROR_UEVENT - Generated upon error detection, currently only via -- 2.43.0.rc1.413.gea7ed67945-goog