Skip to contentSkip to conversation

lib: Make igt_device_get_pci_addr non-static.

PATCH In review Katarzyna Dec 3 participants 4 messages Mar 21, 2019 Library code

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lib: Make igt_device_get_pci_addr non-static.

Let's make igt_pci_addr struct and igt_device_get_pci_addr non-static to be able to use them in tests.

Cc Michal Winiarski <[email protected]>
Cc Chris Wilson <[email protected]>
---
 lib/igt_device.c | 9 +--------
 lib/igt_device.h | 8 ++++++++
 2 files changed, 9 insertions(+), 8 deletions(-)
lib/igt_device.c +1 -8
index a2f9bb3a..fec84609 100644
@@ -130,14 +130,7 @@ static bool igt_device_is_pci(int fd)
 	return strcmp(subsystem, "/pci") == 0;
 }
 
-struct igt_pci_addr {
-	unsigned int domain;
-	unsigned int bus;
-	unsigned int device;
-	unsigned int function;
-};
-
-static int igt_device_get_pci_addr(int fd, struct igt_pci_addr *pci)
+int igt_device_get_pci_addr(int fd, struct igt_pci_addr *pci)
 {
 	char path[IGT_DEV_PATH_LEN];
 	char *buf;
lib/igt_device.h +8 -0
index 278ba7a9..35eb4948 100644
@@ -25,6 +25,13 @@
 #ifndef __IGT_DEVICE_H__
 #define __IGT_DEVICE_H__
 
+struct igt_pci_addr {
+	unsigned int domain;
+	unsigned int bus;
+	unsigned int device;
+	unsigned int function;
+};
+
 int __igt_device_set_master(int fd);
 void igt_device_set_master(int fd);
 
@@ -32,6 +39,7 @@ int __igt_device_drop_master(int fd);
 void igt_device_drop_master(int fd);
 
 int igt_device_get_card_index(int fd);
+int igt_device_get_pci_addr(int fd, struct igt_pci_addr *pci);
 struct pci_device *igt_device_get_pci_device(int fd);
 
 #endif /* __IGT_DEVICE_H__ */
Signature · 6 lines
2.20.1

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
#1 lore raw

Quoting Katarzyna Dec (2019-03-21 09:53:39)

Quoted 2 lines

Let's make igt_pci_addr struct and igt_device_get_pci_addr non-static to be able to use them in tests.

Can do. Please send interface changes with the consumer so we can see the bigger picture.

Quoted 13 lines
Cc Michal Winiarski <[email protected]>
Cc Chris Wilson <[email protected]>
---
 lib/igt_device.c | 9 +--------
 lib/igt_device.h | 8 ++++++++
 2 files changed, 9 insertions(+), 8 deletions(-)
lib/igt_device.c +0 -0
index a2f9bb3a..fec84609 100644

lib/igt_device.c static bool igt_device_is_pci(int fd) · line 138

Quoted 9 lines
lib/igt_device.c +0 -6
@@ -130,14 +130,7 @@ static bool igt_device_is_pci(int fd)
        return strcmp(subsystem, "/pci") == 0;
 }
 
-struct igt_pci_addr {
-       unsigned int domain;
-       unsigned int bus;
-       unsigned int device;
-       unsigned int function;
-};

If we are going to export it, should we make this 4x uint16_t? -Chris
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#2 lore raw

[igt-dev] ✓ Fi.CI.BAT: success for lib: Make igt_device_get_pci_addr non-static.

In reply to Katarzyna Dec
== Series Details ==

== Series Details ==

Series: lib: Make igt_device_get_pci_addr non-static.
URL : https://patchwork.freedesktop.org/series/58344/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5787 -> IGTPW_2679
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://patchwork.freedesktop.org/api/1.0/series/58344/revisions/1/mbox/

Known issues
------------

Here are the changes found in IGTPW_2679 that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@gem_exec_basic@gtt-bsd:
- fi-bwr-2160: NOTRUN -> SKIP [fdo#109271] +103

* igt@gem_exec_basic@readonly-bsd1:
- fi-snb-2520m: NOTRUN -> SKIP [fdo#109271] +57

* igt@i915_selftest@live_uncore:
- fi-skl-gvtdvm: PASS -> DMESG-FAIL [fdo#110210]

* igt@kms_busy@basic-flip-a:
- fi-bsw-n3050: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +1

* igt@kms_busy@basic-flip-c:
- fi-bwr-2160: NOTRUN -> SKIP [fdo#109271] / [fdo#109278]
- fi-snb-2520m: NOTRUN -> SKIP [fdo#109271] / [fdo#109278]

* igt@kms_chamelium@hdmi-crc-fast:
- fi-bsw-n3050: NOTRUN -> SKIP [fdo#109271] +62

* igt@kms_force_connector_basic@force-load-detect:
- fi-bxt-j4205: NOTRUN -> SKIP [fdo#109271] +47

* igt@kms_pipe_crc_basic@read-crc-pipe-a-frame-sequence:
- fi-byt-clapper: PASS -> FAIL [fdo#103191] / [fdo#107362]

* igt@kms_psr@primary_mmap_gtt:
- fi-blb-e6850: NOTRUN -> SKIP [fdo#109271] +27

* igt@prime_vgem@basic-fence-flip:
- fi-gdg-551: PASS -> DMESG-FAIL [fdo#103182]

#### Possible fixes ####

* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
- fi-blb-e6850: INCOMPLETE [fdo#107718] -> PASS

[fdo#103182]: https://bugs.freedesktop.org/show_bug.cgi?id=103182
[fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
[fdo#107362]: https://bugs.freedesktop.org/show_bug.cgi?id=107362
[fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#110210]: https://bugs.freedesktop.org/show_bug.cgi?id=110210

Participating hosts (42 -> 39)
------------------------------

Additional (4): fi-bxt-j4205 fi-bwr-2160 fi-snb-2520m fi-bsw-n3050
Missing (7): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-bdw-samus

Build changes
-------------

* IGT: IGT_4896 -> IGTPW_2679

CI_DRM_5787: 8a27af0b94f56d403bc7806a64a50013a2dd9396 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_2679: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2679/
IGT_4896: 0f9c061247fb7aba21c9459f19f437927a28f32c @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2679/
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#3 lore raw

[igt-dev] ✓ Fi.CI.IGT: success for lib: Make igt_device_get_pci_addr non-static.

In reply to Katarzyna Dec
== Series Details ==

== Series Details ==

Series: lib: Make igt_device_get_pci_addr non-static.
URL : https://patchwork.freedesktop.org/series/58344/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5787_full -> IGTPW_2679_full
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://patchwork.freedesktop.org/api/1.0/series/58344/revisions/1/mbox/

Known issues
------------

Here are the changes found in IGTPW_2679_full that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@gem_wait@wait-bsd2:
- shard-snb: NOTRUN -> SKIP [fdo#109271] +32

* igt@i915_hangman@error-state-capture-bsd2:
- shard-glk: NOTRUN -> SKIP [fdo#109271] +18

* igt@kms_busy@basic-flip-d:
- shard-glk: NOTRUN -> SKIP [fdo#109271] / [fdo#109278]

* igt@kms_busy@extended-modeset-hang-newfb-render-a:
- shard-snb: PASS -> DMESG-WARN [fdo#107956]

* igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-b:
- shard-kbl: PASS -> DMESG-WARN [fdo#107956] +2
- shard-hsw: PASS -> DMESG-WARN [fdo#107956]

* igt@kms_busy@extended-pageflip-hang-oldfb-render-e:
- shard-kbl: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +2

* igt@kms_flip@flip-vs-expired-vblank:
- shard-apl: PASS -> FAIL [fdo#102887] / [fdo#105363]

* igt@kms_frontbuffer_tracking@psr-2p-primscrn-spr-indfb-draw-pwrite:
- shard-kbl: NOTRUN -> SKIP [fdo#109271] +43

* igt@kms_plane_alpha_blend@pipe-a-alpha-opaque-fb:
- shard-kbl: NOTRUN -> FAIL [fdo#108145]

* igt@kms_plane_alpha_blend@pipe-c-constant-alpha-max:

    - shard-glk:          PASS -> FAIL [fdo#108145]
    - shard-kbl:          PASS -> FAIL [fdo#108145]
    - shard-apl:          PASS -> FAIL [fdo#108145]

* igt@kms_plane_alpha_blend@pipe-c-constant-alpha-mid:
- shard-snb: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +3

* igt@kms_rotation_crc@multiplane-rotation-cropping-top:
- shard-kbl: NOTRUN -> FAIL [fdo#109016]

* igt@kms_setmode@basic:
- shard-kbl: PASS -> FAIL [fdo#99912]

* igt@kms_universal_plane@disable-primary-vs-flip-pipe-d:
- shard-apl: NOTRUN -> SKIP [fdo#109271] / [fdo#109278]

* igt@kms_vblank@pipe-c-ts-continuation-suspend:
- shard-apl: PASS -> FAIL [fdo#104894]
- shard-kbl: PASS -> FAIL [fdo#104894]

* igt@prime_nv_test@i915_import_pread_pwrite:
- shard-apl: NOTRUN -> SKIP [fdo#109271]

#### Possible fixes ####

* igt@kms_busy@extended-modeset-hang-newfb-render-b:
- shard-hsw: DMESG-WARN [fdo#107956] -> PASS +2
- shard-snb: DMESG-WARN [fdo#107956] -> PASS

* igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-c:
- shard-kbl: DMESG-WARN [fdo#107956] -> PASS

* igt@kms_cursor_crc@cursor-128x42-sliding:
- shard-kbl: FAIL [fdo#103232] -> PASS +1
- shard-apl: FAIL [fdo#103232] -> PASS +1

* igt@kms_plane_scaling@pipe-c-scaler-with-rotation:
- shard-glk: SKIP [fdo#109271] / [fdo#109278] -> PASS

* igt@kms_rotation_crc@multiplane-rotation:
- shard-kbl: INCOMPLETE [fdo#103665] -> PASS

* igt@kms_rotation_crc@multiplane-rotation-cropping-bottom:
- shard-kbl: DMESG-FAIL [fdo#105763] -> PASS

* igt@kms_vblank@pipe-a-ts-continuation-modeset-rpm:
- shard-apl: FAIL [fdo#104894] -> PASS

* igt@perf_pmu@rc6-runtime-pm-long:
- shard-apl: FAIL [fdo#105010] -> PASS
- shard-kbl: FAIL [fdo#105010] -> PASS

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

[fdo#102887]: https://bugs.freedesktop.org/show_bug.cgi?id=102887
[fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
[fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
[fdo#104894]: https://bugs.freedesktop.org/show_bug.cgi?id=104894
[fdo#105010]: https://bugs.freedesktop.org/show_bug.cgi?id=105010
[fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
[fdo#105763]: https://bugs.freedesktop.org/show_bug.cgi?id=105763
[fdo#107956]: https://bugs.freedesktop.org/show_bug.cgi?id=107956
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#109016]: https://bugs.freedesktop.org/show_bug.cgi?id=109016
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912

Participating hosts (10 -> 5)
------------------------------

Missing (5): shard-skl pig-hsw-4770r pig-glk-j5005 shard-iclb pig-skl-6260u

Build changes
-------------

* IGT: IGT_4896 -> IGTPW_2679
* Piglit: piglit_4509 -> None

CI_DRM_5787: 8a27af0b94f56d403bc7806a64a50013a2dd9396 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_2679: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2679/
IGT_4896: 0f9c061247fb7aba21c9459f19f437927a28f32c @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2679/
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev