Skip to contentSkip to conversation

drm/i915: make device info bitfield flags bools

PATCH Superseded Jani Nikula 2 participants 3 messages Mar 9, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 drm/i915: make device info bitfield flags bools

This is more robust for assignments and comparisons.

---
 drivers/gpu/drm/i915/i915_drv.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_drv.h +1 -1
index f37ac120a29d..0f5db53501be 100644
@@ -789,7 +789,7 @@ struct intel_csr {
 	func(has_ddi) sep \
 	func(has_fpga_dbg)
 
-#define DEFINE_FLAG(name) u8 name:1
+#define DEFINE_FLAG(name) bool name:1
 #define SEP_SEMICOLON ;
 
 struct intel_device_info {
Signature · 6 lines
2.1.4

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

PATCH 2/2 drm/i915: don't mix bitwise and logical operations for has_snoop

Also make the code more readable.

---
 drivers/gpu/drm/i915/i915_dma.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/i915_dma.c +4 -2
index 4aa3db61a535..809d3783b033 100644
@@ -853,9 +853,11 @@ static void intel_device_info_runtime_init(struct drm_device *dev)
 	else if (INTEL_INFO(dev)->gen >= 9)
 		gen9_sseu_info_init(dev);
 
-	/* Snooping is broken on BXT A stepping. */
 	info->has_snoop = !info->has_llc;
-	info->has_snoop &= !IS_BXT_REVID(dev, 0, BXT_REVID_A1);
+
+	/* Snooping is broken on BXT A stepping. */
+	if (IS_BXT_REVID(dev, 0, BXT_REVID_A1))
+		info->has_snoop = false;
 
 	DRM_DEBUG_DRIVER("slice total: %u\n", info->slice_total);
 	DRM_DEBUG_DRIVER("subslice total: %u\n", info->subslice_total);
Signature · 6 lines
2.1.4

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#2 lore raw

✗ Fi.CI.BAT: warning for series starting with [1/2] drm/i915: make device info bitfield flags bools

In reply to Jani Nikula
== Series Details ==

== Series Details ==

Series: series starting with [1/2] drm/i915: make device info bitfield flags bools
URL : https://patchwork.freedesktop.org/series/4270/
State : warning

== Summary ==

Series 4270v1 Series without cover letter
http://patchwork.freedesktop.org/api/1.0/series/4270/revisions/1/mbox/

Test gem_ringfill:

        Subgroup basic-default-s3:
                pass       -> DMESG-WARN (bsw-nuc-2)
Test kms_flip:
        Subgroup basic-flip-vs-modeset:
                dmesg-warn -> PASS       (bdw-ultra)
        Subgroup basic-flip-vs-wf_vblank:
                pass       -> DMESG-WARN (hsw-brixbox)
Test kms_pipe_crc_basic:
        Subgroup nonblocking-crc-pipe-b-frame-sequence:
                dmesg-warn -> PASS       (hsw-brixbox)
        Subgroup suspend-read-crc-pipe-c:
                dmesg-warn -> PASS       (bsw-nuc-2)
Test pm_rpm:
        Subgroup basic-pci-d3-state:
                pass       -> DMESG-WARN (snb-dellxps)
bdw-nuci7        total:186  pass:174  dwarn:0   dfail:0   fail:0   skip:12 
bdw-ultra        total:186  pass:167  dwarn:0   dfail:0   fail:0   skip:19 
bsw-nuc-2        total:186  pass:150  dwarn:1   dfail:0   fail:0   skip:35 
byt-nuc          total:186  pass:154  dwarn:0   dfail:0   fail:0   skip:32 
hsw-brixbox      total:186  pass:165  dwarn:1   dfail:0   fail:0   skip:20 
ilk-hp8440p      total:186  pass:126  dwarn:1   dfail:0   fail:0   skip:59 
skl-i5k-2        total:186  pass:165  dwarn:0   dfail:0   fail:0   skip:21 
skl-i7k-2        total:186  pass:165  dwarn:0   dfail:0   fail:0   skip:21 
snb-dellxps      total:186  pass:154  dwarn:2   dfail:0   fail:0   skip:30 

Results at /archive/results/CI_IGT_test/Patchwork_1549/

ab403b26610034afe0e0c97d960782bad98b97d0 drm-intel-nightly: 2016y-03m-09d-09h-25m-31s UTC integration manifest 8a922e5b2f7636902305978ecafacdaa164d3dc4 drm/i915: don't mix bitwise and logical operations for has_snoop 4f18aa47bf932a32d62486bcd88a56811d1eff58 drm/i915: make device info bitfield flags bools

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx