diff mbox

drm/i915: Reattach comment, complete type specification

Message ID 1471616622-6919-1-git-send-email-david.s.gordon@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Dave Gordon Aug. 19, 2016, 2:23 p.m. UTC
In the recent patch
bc3d674 drm/i915: Allow userspace to request no-error-capture upon ...
the final version moved the flags and the associated #defines around
so they were adjacent; unfortunately, they ended up between a comment
and the thing (hw_id) to which the comment applies :(

So this patch reshuffles the comment and subject back together.

Also, as we're touching 'hw_id', let's change it from just 'unsigned'
to a fully-specified 'unsigned int', because some code checking tools
(including checkpatch) object to plain 'unsigned'.

Fixes: bc3d674462e5df5f2b33adbfcaad9edff8b827f4

Signed-off-by: Dave Gordon <david.s.gordon@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_drv.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Chris Wilson Aug. 19, 2016, 2:29 p.m. UTC | #1
On Fri, Aug 19, 2016 at 03:23:42PM +0100, Dave Gordon wrote:
> In the recent patch
> bc3d674 drm/i915: Allow userspace to request no-error-capture upon ...
> the final version moved the flags and the associated #defines around
> so they were adjacent; unfortunately, they ended up between a comment
> and the thing (hw_id) to which the comment applies :(
> 
> So this patch reshuffles the comment and subject back together.
> 
> Also, as we're touching 'hw_id', let's change it from just 'unsigned'
> to a fully-specified 'unsigned int', because some code checking tools
> (including checkpatch) object to plain 'unsigned'.
> 
> Fixes: bc3d674462e5df5f2b33adbfcaad9edff8b827f4
> 
> Signed-off-by: Dave Gordon <david.s.gordon@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris
Chris Wilson Aug. 19, 2016, 2:30 p.m. UTC | #2
On Fri, Aug 19, 2016 at 03:23:42PM +0100, Dave Gordon wrote:
> In the recent patch
> bc3d674 drm/i915: Allow userspace to request no-error-capture upon ...
> the final version moved the flags and the associated #defines around
> so they were adjacent; unfortunately, they ended up between a comment
> and the thing (hw_id) to which the comment applies :(
> 
> So this patch reshuffles the comment and subject back together.
> 
> Also, as we're touching 'hw_id', let's change it from just 'unsigned'
> to a fully-specified 'unsigned int', because some code checking tools
> (including checkpatch) object to plain 'unsigned'.
> 
> Fixes: bc3d674462e5df5f2b33adbfcaad9edff8b827f4

You mention checkpatch and then use a commit sha that will annoy it ;)
-Chris
Dave Gordon Aug. 19, 2016, 4:02 p.m. UTC | #3
On 19/08/16 15:30, Chris Wilson wrote:
> On Fri, Aug 19, 2016 at 03:23:42PM +0100, Dave Gordon wrote:
>> In the recent patch
>> bc3d674 drm/i915: Allow userspace to request no-error-capture upon ...
>> the final version moved the flags and the associated #defines around
>> so they were adjacent; unfortunately, they ended up between a comment
>> and the thing (hw_id) to which the comment applies :(
>>
>> So this patch reshuffles the comment and subject back together.
>>
>> Also, as we're touching 'hw_id', let's change it from just 'unsigned'
>> to a fully-specified 'unsigned int', because some code checking tools
>> (including checkpatch) object to plain 'unsigned'.
>>
>> Fixes: bc3d674462e5df5f2b33adbfcaad9edff8b827f4
>
> You mention checkpatch and then use a commit sha that will annoy it ;)
> -Chris

Strangely, it didn't object at all, even in strict mode.

$ scripts/checkpatch.pl --strict 
0001-drm-i915-Reattach-comment-complete-type-specificatio.patch
total: 0 errors, 0 warnings, 0 checks, 14 lines checked

0001-drm-i915-Reattach-comment-complete-type-specificatio.patch has no 
obvious style problems and is ready for submission.

Hmm ...

actually, it seems impossible to satisfy checkpatch's requirements for
references to commits. For example, with the line

commit bc3d674462e5 ("Allow userspace to request no-error-capture")

it will object to the description not matching the original commit
(because it's abbreviated), whereas if we write

commit bc3d674462e5 ("drm/i915: Allow userspace to request 
no-error-capture upon GPU hangs")

as it suggests, it complains about the resulting line length:

* Possible unwrapped commit description (prefer a maximum 75 chars per line)

However wrapping the commit description as suggested leads to complaints
about the description mismatch again (as that part of the check doesn't
consider that strings inside ("") might span line breaks).

So on the whole I'm quite happy with my original commit message :)

.Dave.
Dave Gordon Aug. 19, 2016, 4:11 p.m. UTC | #4
On 19/08/16 15:49, Patchwork wrote:
> == Series Details ==
>
> Series: drm/i915: Reattach comment, complete type specification
> URL   : https://patchwork.freedesktop.org/series/11327/
> State : failure
>
> == Summary ==
>
> Series 11327v1 drm/i915: Reattach comment, complete type specification
> http://patchwork.freedesktop.org/api/1.0/series/11327/revisions/1/mbox
>
> Test kms_cursor_legacy:
>         Subgroup basic-flip-vs-cursor-legacy:
>                 pass       -> FAIL       (ro-byt-n2820)

https://bugs.freedesktop.org/show_bug.cgi?id=97188
Failed assertion: get_vblank(display->drm_fd, pipe, 0) == vblank_start

>         Subgroup basic-flip-vs-cursor-varying-size:
>                 pass       -> FAIL       (ro-byt-n2820)

... and again ...

>                 fail       -> PASS       (fi-hsw-i7-4770k)
>                 pass       -> FAIL       (ro-skl3-i5-6260u)

... and again ...

> Test kms_pipe_crc_basic:
>         Subgroup suspend-read-crc-pipe-a:
>                 dmesg-warn -> SKIP       (ro-bdw-i5-5250u)
>         Subgroup suspend-read-crc-pipe-b:
>                 skip       -> DMESG-WARN (ro-bdw-i5-5250u)

https://bugs.freedesktop.org/show_bug.cgi?id=96614
*ERROR* failed to enable link training/failed to start channel equalization

Ready for merge :)

.Dave.

> fi-hsw-i7-4770k  total:244  pass:222  dwarn:0   dfail:0   fail:0   skip:22
> fi-kbl-qkkr      total:244  pass:186  dwarn:29  dfail:0   fail:3   skip:26
> fi-skl-i7-6700k  total:244  pass:208  dwarn:4   dfail:2   fail:2   skip:28
> fi-snb-i7-2600   total:244  pass:202  dwarn:0   dfail:0   fail:0   skip:42
> ro-bdw-i5-5250u  total:240  pass:218  dwarn:2   dfail:0   fail:2   skip:18
> ro-bdw-i7-5557U  total:240  pass:220  dwarn:3   dfail:0   fail:0   skip:17
> ro-bdw-i7-5600u  total:240  pass:205  dwarn:1   dfail:0   fail:2   skip:32
> ro-bsw-n3050     total:240  pass:195  dwarn:0   dfail:0   fail:3   skip:42
> ro-byt-n2820     total:240  pass:196  dwarn:0   dfail:0   fail:4   skip:40
> ro-hsw-i3-4010u  total:240  pass:213  dwarn:0   dfail:0   fail:1   skip:26
> ro-hsw-i7-4770r  total:240  pass:185  dwarn:0   dfail:0   fail:0   skip:55
> ro-ilk1-i5-650   total:235  pass:174  dwarn:0   dfail:0   fail:2   skip:59
> ro-ivb-i7-3770   total:240  pass:204  dwarn:0   dfail:0   fail:1   skip:35
> ro-ivb2-i7-3770  total:240  pass:208  dwarn:0   dfail:0   fail:1   skip:31
> ro-skl3-i5-6260u total:240  pass:222  dwarn:0   dfail:0   fail:4   skip:14
>
> Results at /archive/results/CI_IGT_test/RO_Patchwork_1944/
>
> 21defee drm-intel-nightly: 2016y-08m-19d-09h-06m-36s UTC integration manifest
> 9b4d69d drm/i915: Reattach comment, complete type specification
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 35caa9b..f25b443 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -887,11 +887,12 @@  struct i915_gem_context {
 
 	struct i915_ctx_hang_stats hang_stats;
 
-	/* Unique identifier for this context, used by the hw for tracking */
 	unsigned long flags;
 #define CONTEXT_NO_ZEROMAP		BIT(0)
 #define CONTEXT_NO_ERROR_CAPTURE	BIT(1)
-	unsigned hw_id;
+
+	/* Unique identifier for this context, used by the hw for tracking */
+	unsigned int hw_id;
 	u32 user_handle;
 
 	u32 ggtt_alignment;