From: Christoph Manszewski <christoph.manszewski@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t 1/2] lib/i915/mocs: Move mocs library to 'lib' folder
Date: Fri, 9 Jun 2023 15:01:27 +0200 [thread overview]
Message-ID: <20230609130128.2197571-1-christoph.manszewski@intel.com> (raw)
Since mocs are driver agnostic and are currently used in driver agnostic
code, move them to the 'lib' folder and get rid of i915 references.
Signed-off-by: Christoph Manszewski <christoph.manszewski@intel.com>
---
lib/igt_draw.c | 2 +-
lib/{i915 => }/intel_mocs.c | 9 ++++-----
lib/{i915 => }/intel_mocs.h | 0
lib/meson.build | 2 +-
tests/i915/gem_ccs.c | 2 +-
tests/i915/gem_exercise_blt.c | 2 +-
tests/i915/gem_lmem_swapping.c | 2 +-
7 files changed, 9 insertions(+), 10 deletions(-)
rename lib/{i915 => }/intel_mocs.c (89%)
rename lib/{i915 => }/intel_mocs.h (100%)
diff --git a/lib/igt_draw.c b/lib/igt_draw.c
index a5c0cbbf..6f362994 100644
--- a/lib/igt_draw.c
+++ b/lib/igt_draw.c
@@ -30,13 +30,13 @@
#include "intel_bufops.h"
#include "intel_batchbuffer.h"
#include "intel_chipset.h"
+#include "intel_mocs.h"
#include "igt_core.h"
#include "igt_fb.h"
#include "ioctl_wrappers.h"
#include "i830_reg.h"
#include "i915/gem_create.h"
#include "i915/gem_mman.h"
-#include "i915/intel_mocs.h"
#include "xe/xe_ioctl.h"
#include "xe/xe_query.h"
diff --git a/lib/i915/intel_mocs.c b/lib/intel_mocs.c
similarity index 89%
rename from lib/i915/intel_mocs.c
rename to lib/intel_mocs.c
index 95f0fbde..cf3b8e4f 100644
--- a/lib/i915/intel_mocs.c
+++ b/lib/intel_mocs.c
@@ -4,7 +4,6 @@
*/
#include "igt.h"
-#include "i915/gem.h"
#include "intel_mocs.h"
#define DG1_MOCS_UC_IDX 1
@@ -18,12 +17,12 @@
#define XY_BLOCK_COPY_BLT_MOCS_SHIFT 21
#define XY_CTRL_SURF_COPY_BLT_MOCS_SHIFT 25
-struct drm_i915_mocs_index {
+struct drm_intel_mocs_index {
uint8_t uc_index;
uint8_t wb_index;
};
-static void get_mocs_index(int fd, struct drm_i915_mocs_index *mocs)
+static void get_mocs_index(int fd, struct drm_intel_mocs_index *mocs)
{
uint16_t devid = intel_get_drm_devid(fd);
@@ -58,7 +57,7 @@ static void get_mocs_index(int fd, struct drm_i915_mocs_index *mocs)
uint8_t intel_get_wb_mocs(int fd)
{
- struct drm_i915_mocs_index mocs;
+ struct drm_intel_mocs_index mocs;
get_mocs_index(fd, &mocs);
return mocs.wb_index << 1;
@@ -66,7 +65,7 @@ uint8_t intel_get_wb_mocs(int fd)
uint8_t intel_get_uc_mocs(int fd)
{
- struct drm_i915_mocs_index mocs;
+ struct drm_intel_mocs_index mocs;
get_mocs_index(fd, &mocs);
return mocs.uc_index << 1;
diff --git a/lib/i915/intel_mocs.h b/lib/intel_mocs.h
similarity index 100%
rename from lib/i915/intel_mocs.h
rename to lib/intel_mocs.h
diff --git a/lib/meson.build b/lib/meson.build
index 55efdc83..ad5d999d 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -13,7 +13,6 @@ lib_sources = [
'i915/gem_vm.c',
'i915/intel_decode.c',
'i915/intel_memory_region.c',
- 'i915/intel_mocs.c',
'i915/intel_cmds_info.c',
'i915/i915_blt.c',
'i915/i915_crc.c',
@@ -60,6 +59,7 @@ lib_sources = [
'intel_ctx.c',
'intel_device_info.c',
'intel_mmio.c',
+ 'intel_mocs.c',
'ioctl_wrappers.c',
'media_spin.c',
'media_fill.c',
diff --git a/tests/i915/gem_ccs.c b/tests/i915/gem_ccs.c
index ff6504b3..d38ab49a 100644
--- a/tests/i915/gem_ccs.c
+++ b/tests/i915/gem_ccs.c
@@ -14,7 +14,7 @@
#include "i915/gem_create.h"
#include "lib/intel_chipset.h"
#include "i915/i915_blt.h"
-#include "i915/intel_mocs.h"
+#include "intel_mocs.h"
/**
* TEST: gem ccs
* Description: Exercise gen12 blitter with and without flatccs compression
diff --git a/tests/i915/gem_exercise_blt.c b/tests/i915/gem_exercise_blt.c
index 3287ced7..89f89d21 100644
--- a/tests/i915/gem_exercise_blt.c
+++ b/tests/i915/gem_exercise_blt.c
@@ -9,7 +9,7 @@
#include "i915/gem_create.h"
#include "lib/intel_chipset.h"
#include "i915/i915_blt.h"
-#include "i915/intel_mocs.h"
+#include "intel_mocs.h"
/**
* TEST: gem exercise blt
* Description: Exercise blitter commands
diff --git a/tests/i915/gem_lmem_swapping.c b/tests/i915/gem_lmem_swapping.c
index 6f1340ba..8211edbe 100644
--- a/tests/i915/gem_lmem_swapping.c
+++ b/tests/i915/gem_lmem_swapping.c
@@ -23,7 +23,7 @@
#include <sys/wait.h>
#include "drm.h"
#include "i915/i915_blt.h"
-#include "i915/intel_mocs.h"
+#include "intel_mocs.h"
/**
* TEST: gem lmem swapping
* Description: Exercise local memory swapping.
--
2.40.1
next reply other threads:[~2023-06-09 13:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-09 13:01 Christoph Manszewski [this message]
2023-06-09 13:01 ` [igt-dev] [PATCH i-g-t 2/2] lib/[gpu_cmds|intel_bufops]: Enable surface state mocs setting Christoph Manszewski
2023-06-12 5:28 ` Zbigniew Kempczyński
2023-06-09 17:56 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] lib/i915/mocs: Move mocs library to 'lib' folder Patchwork
2023-06-11 2:25 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2023-06-12 5:25 ` [igt-dev] [PATCH i-g-t 1/2] " Zbigniew Kempczyński
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230609130128.2197571-1-christoph.manszewski@intel.com \
--to=christoph.manszewski@intel.com \
--cc=igt-dev@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox