Skip to contentSkip to conversation

drm/i915/skl: Fix up positive error code

PATCH Superseded Tvrtko Ursulin 4 participants 10 messages Mar 24, 2015 – Mar 25, 2015

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

PATCH 1/1 drm/i915/skl: Fix up positive error code

From: Tvrtko Ursulin <[email protected]>

It should have been negative since it is returned with ERR_PTR().

---
 drivers/gpu/drm/i915/i915_gem_gtt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_gem_gtt.c +1 -1
index fc56c11..9903bb0 100644
@@ -2540,7 +2540,7 @@ intel_rotate_fb_obj_pages(struct i915_ggtt_view *ggtt_view,
 	struct sg_table *st;
 	unsigned int tile_pitch, tile_height;
 	unsigned int width_pages, height_pages;
-	int ret = ENOMEM;
+	int ret = -ENOMEM;
 
 	pages = obj->base.size / PAGE_SIZE;
 
Signature · 6 lines
2.3.2

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
maintainer
#1 lore raw
Quoted 3 lines · Tvrtko Ursulin

From: Tvrtko Ursulin <[email protected]>

It should have been negative since it is returned with ERR_PTR().

Please always reference the commit that introduced the issue.

commit 50470bb011c4be278097670bea92462f4e8c8945

Author: Tvrtko Ursulin <[email protected]>
Date:   Mon Mar 23 11:10:36 2015 +0000

drm/i915/skl: Support secondary (rotated) frame buffer mapping

BR,
Jani.

Quoted 26 lines
---
 drivers/gpu/drm/i915/i915_gem_gtt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_gem_gtt.c +1 -1
index fc56c11..9903bb0 100644
@@ -2540,7 +2540,7 @@ intel_rotate_fb_obj_pages(struct i915_ggtt_view *ggtt_view,
 	struct sg_table *st;
 	unsigned int tile_pitch, tile_height;
 	unsigned int width_pages, height_pages;
-	int ret = ENOMEM;
+	int ret = -ENOMEM;
 
 	pages = obj->base.size / PAGE_SIZE;
 
Signature · 6 lines
2.3.2

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#2 lore raw
Quoted 6 lines · Jani Nikula
Quoted 3 lines · Tvrtko Ursulin

From: Tvrtko Ursulin <[email protected]>

It should have been negative since it is returned with ERR_PTR().

Please always reference the commit that introduced the issue.

Is there some more precisely defined criteria for "always"?

In this case this is at the moment dead code freshly merged to -nightly only so ideally it would even be better to fix it up in the original patch if possible?

Regards,

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

maintainer
#3 lore raw
Quoted 9 lines · Tvrtko Ursulin
Quoted 6 lines · Jani Nikula
Quoted 3 lines · Tvrtko Ursulin

From: Tvrtko Ursulin <[email protected]>

It should have been negative since it is returned with ERR_PTR().

Please always reference the commit that introduced the issue.

Is there some more precisely defined criteria for "always"?

Always when you fix a bug that was introduced by another commit?

I need the commit reference to check if I need to queue the fix to current development kernel (i.e. v4.0-rcN).

If someone backports the commit, it's easier to check if the commit is referenced by a later commit potentially fixing issues in it.

Quoted 3 lines

In this case this is at the moment dead code freshly merged to -nightly only so ideally it would even be better to fix it up in the original patch if possible?

I typically wouldn't know this by looking at a patch. The commit reference helps. And to squash it into another commit, the reference helps.

Reducing the burden from the maintainers helps you too in the end!

BR,
Jani.

Quoted 4 lines

Regards,

Tvrtko

Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#4 lore raw
Quoted 11 lines · Jani Nikula
Quoted 9 lines · Tvrtko Ursulin
Quoted 6 lines · Jani Nikula
Quoted 3 lines · Tvrtko Ursulin

From: Tvrtko Ursulin <[email protected]>

It should have been negative since it is returned with ERR_PTR().

Please always reference the commit that introduced the issue.

Is there some more precisely defined criteria for "always"?

Quoted 7 lines

Always when you fix a bug that was introduced by another commit?

I need the commit reference to check if I need to queue the fix to current development kernel (i.e. v4.0-rcN).

If someone backports the commit, it's easier to check if the commit is referenced by a later commit potentially fixing issues in it.

Sure, but all bugs are introduced by other commits. So my question was only along those lines, nothing more than that.

Regards,

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

#5 lore raw
Quoted 14 lines · Tvrtko Ursulin
Quoted 13 lines · Jani Nikula
Quoted 9 lines · Tvrtko Ursulin
Quoted 6 lines · Jani Nikula
Quoted 3 lines · Tvrtko Ursulin

From: Tvrtko Ursulin <[email protected]>

It should have been negative since it is returned with ERR_PTR().

Please always reference the commit that introduced the issue.

Is there some more precisely defined criteria for "always"?

Always when you fix a bug that was introduced by another commit?

Quoted 8 lines
Quoted 5 lines

I need the commit reference to check if I need to queue the fix to current development kernel (i.e. v4.0-rcN).

If someone backports the commit, it's easier to check if the commit is referenced by a later commit potentially fixing issues in it.

Sure, but all bugs are introduced by other commits. So my question was only along those lines, nothing more than that.

In that sense it's an always always. If you don't maintainers have to do this, and that usually means more errors and screwups. Jani&I are bringing this up since we're just going through some fireworks because of this.

For similar reasons you should also always cc the author/reviewers of the offending commit. Not a lot of people read all of intel-gfx, cc'ing relevant people is therefore important to keep everyone in the loop.

Thanks, Daniel

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Tested-by on v1 1/1
#6 lore raw
In reply to Tvrtko Ursulin

Task id: 6037 -------------------------------------Summary-------------------------------------
Platform Delta drm-intel-nightly Series Applied

PNV                 -2              269/269              267/269
ILK                 -1              303/303              302/303
SNB                                  304/304              304/304
IVB                                  338/338              338/338
BYT                                  287/287              287/287
HSW                                  362/362              362/362
BDW                                  310/310              310/310
-------------------------------------Detailed-------------------------------------
Platform  Test                                drm-intel-nightly          Series Applied
 PNV  igt@gem_userptr_blits@coherency-sync      CRASH(1)PASS(1)      CRASH(2)
 PNV  igt@gem_userptr_blits@minor-unsync-normal      DMESG_WARN(1)PASS(1)      DMESG_WARN(1)PASS(1)
*ILK  igt@gem_seqno_wrap      PASS(2)      DMESG_WARN(1)PASS(1)

Note: You need to pay more attention to line start with '*'
_______________________________________________
Intel-gfx mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

#7 lore raw

PATCH v2 1/1 drm/i915/skl: Fix up positive error code

In reply to Tvrtko Ursulin

From: Tvrtko Ursulin <[email protected]>

It should have been negative since it is returned with ERR_PTR().

Introduced in new code commit:

commit 50470bb011c4be278097670bea92462f4e8c8945
Author: Tvrtko Ursulin <[email protected]>
Date: Mon Mar 23 11:10:36 2015 +0000

drm/i915/skl: Support secondary (rotated) frame buffer mapping

---
 drivers/gpu/drm/i915/i915_gem_gtt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_gem_gtt.c +1 -1
index fc56c11..9903bb0 100644
@@ -2540,7 +2540,7 @@ intel_rotate_fb_obj_pages(struct i915_ggtt_view *ggtt_view,
 	struct sg_table *st;
 	unsigned int tile_pitch, tile_height;
 	unsigned int width_pages, height_pages;
-	int ret = ENOMEM;
+	int ret = -ENOMEM;
 
 	pages = obj->base.size / PAGE_SIZE;
 
Signature · 6 lines
2.3.2

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Tested-by on v2 1/1
#8 lore raw

Task id: 6037 -------------------------------------Summary-------------------------------------
Platform Delta drm-intel-nightly Series Applied

PNV                 -2              269/269              267/269
ILK                 -1              303/303              302/303
SNB                                  304/304              304/304
IVB                                  338/338              338/338
BYT                                  287/287              287/287
HSW                                  362/362              362/362
BDW                                  310/310              310/310
-------------------------------------Detailed-------------------------------------
Platform  Test                                drm-intel-nightly          Series Applied
 PNV  igt@gem_userptr_blits@coherency-sync      CRASH(1)PASS(3)      CRASH(2)
 PNV  igt@gem_userptr_blits@minor-unsync-normal      DMESG_WARN(1)PASS(1)      DMESG_WARN(1)PASS(1)
*ILK  igt@gem_seqno_wrap      PASS(3)      DMESG_WARN(1)PASS(1)

Note: You need to pay more attention to line start with '*'
_______________________________________________
Intel-gfx mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

#9 lore raw
In reply to Tvrtko Ursulin
Quoted 6 lines · Tvrtko Ursulin

From: Tvrtko Ursulin <[email protected]>

It should have been negative since it is returned with ERR_PTR().

Introduced in new code commit:

Quoted 8 lines

commit 50470bb011c4be278097670bea92462f4e8c8945
Author: Tvrtko Ursulin <[email protected]>
Date: Mon Mar 23 11:10:36 2015 +0000

drm/i915/skl: Support secondary (rotated) frame buffer mapping

Queued for -next, thanks for the patch.
-Daniel

Quoted 24 lines
---
 drivers/gpu/drm/i915/i915_gem_gtt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_gem_gtt.c +1 -1
index fc56c11..9903bb0 100644
@@ -2540,7 +2540,7 @@ intel_rotate_fb_obj_pages(struct i915_ggtt_view *ggtt_view,
 	struct sg_table *st;
 	unsigned int tile_pitch, tile_height;
 	unsigned int width_pages, height_pages;
-	int ret = ENOMEM;
+	int ret = -ENOMEM;
 
 	pages = obj->base.size / PAGE_SIZE;
 
Signature · 6 lines
2.3.2

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx