Skip to contentSkip to conversation

drm: Constify drm_color_lut_check()

PATCH In review Ville Syrjala 5 participants 8 messages Jan 29, 2019

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

PATCH 1/1 drm: Constify drm_color_lut_check()

From: Ville Syrjälä <[email protected]>

drm_color_lut_check() doens't modify the passed in blob so let's make it const.

Also s/uint32_y/u32/ while at it.

---
 drivers/gpu/drm/drm_color_mgmt.c | 6 +++---
 include/drm/drm_color_mgmt.h     | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)
drivers/gpu/drm/drm_color_mgmt.c +3 -3
index 968ca7c91ad8..3c8826a91a03 100644
@@ -474,10 +474,10 @@ EXPORT_SYMBOL(drm_plane_create_color_properties);
  *
  * Returns 0 on success, -EINVAL on failure.
  */
-int drm_color_lut_check(struct drm_property_blob *lut,
-			uint32_t tests)
+int drm_color_lut_check(const struct drm_property_blob *lut,
+			u32 tests)
 {
-	struct drm_color_lut *entry;
+	const struct drm_color_lut *entry;
 	int i;
 
 	if (!lut || !tests)
include/drm/drm_color_mgmt.h +2 -2
index 6affbda6d9cb..58d4b20b5b97 100644
@@ -96,6 +96,6 @@ enum drm_color_lut_tests {
 	DRM_COLOR_LUT_NON_DECREASING = BIT(1),
 };
 
-int drm_color_lut_check(struct drm_property_blob *lut,
-			uint32_t tests);
+int drm_color_lut_check(const struct drm_property_blob *lut,
+			u32 tests);
 #endif
Signature · 6 lines
2.19.2

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

Hi Ville.

Quoted 19 lines · Ville Syrjala

From: Ville Syrjälä <[email protected]>

drm_color_lut_check() doens't modify the passed in blob so let's make it const.

Also s/uint32_y/u32/ while at it.

---
 drivers/gpu/drm/drm_color_mgmt.c | 6 +++---
 include/drm/drm_color_mgmt.h     | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)
drivers/gpu/drm/drm_color_mgmt.c +0 -0
index 968ca7c91ad8..3c8826a91a03 100644

drivers/gpu/drm/drm_color_mgmt.c EXPORT_SYMBOL(drm_plane_create_color_properties); · line 478

Quoted 7 lines
drivers/gpu/drm/drm_color_mgmt.c +2 -2
@@ -474,10 +474,10 @@ EXPORT_SYMBOL(drm_plane_create_color_properties);
  *
  * Returns 0 on success, -EINVAL on failure.
  */
-int drm_color_lut_check(struct drm_property_blob *lut,
-			uint32_t tests)
+int drm_color_lut_check(const struct drm_property_blob *lut,
+			u32 tests)

No need to linewrap this line.

Quoted 11 lines
drivers/gpu/drm/drm_color_mgmt.c +1 -1
 {
-	struct drm_color_lut *entry;
+	const struct drm_color_lut *entry;
 	int i;
 
 	if (!lut || !tests)
include/drm/drm_color_mgmt.h +0 -0
index 6affbda6d9cb..58d4b20b5b97 100644

include/drm/drm_color_mgmt.h enum drm_color_lut_tests { · line 100

Quoted 7 lines
include/drm/drm_color_mgmt.h +2 -2
@@ -96,6 +96,6 @@ enum drm_color_lut_tests {
 	DRM_COLOR_LUT_NON_DECREASING = BIT(1),
 };
 
-int drm_color_lut_check(struct drm_property_blob *lut,
-			uint32_t tests);
+int drm_color_lut_check(const struct drm_property_blob *lut,
+			u32 tests);

Likewise.

With the linewrap fixed:

Note: does not apply to my drm-misc tree. Anything I miss here?

Sam

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

#2 lore raw
Quoted 45 lines · Sam Ravnborg

Hi Ville.

Quoted 19 lines · Ville Syrjala

From: Ville Syrjälä <[email protected]>

drm_color_lut_check() doens't modify the passed in blob so let's make it const.

Also s/uint32_y/u32/ while at it.

---
 drivers/gpu/drm/drm_color_mgmt.c | 6 +++---
 include/drm/drm_color_mgmt.h     | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)
drivers/gpu/drm/drm_color_mgmt.c +0 -0
index 968ca7c91ad8..3c8826a91a03 100644

drivers/gpu/drm/drm_color_mgmt.c EXPORT_SYMBOL(drm_plane_create_color_properties); · line 478

Quoted 7 lines
drivers/gpu/drm/drm_color_mgmt.c +2 -2
@@ -474,10 +474,10 @@ EXPORT_SYMBOL(drm_plane_create_color_properties);
  *
  * Returns 0 on success, -EINVAL on failure.
  */
-int drm_color_lut_check(struct drm_property_blob *lut,
-			uint32_t tests)
+int drm_color_lut_check(const struct drm_property_blob *lut,
+			u32 tests)

No need to linewrap this line.

Quoted 14 lines
drivers/gpu/drm/drm_color_mgmt.c +1 -1
 {
-	struct drm_color_lut *entry;
+	const struct drm_color_lut *entry;
 	int i;
 
 	if (!lut || !tests)
include/drm/drm_color_mgmt.h +0 -0
index 6affbda6d9cb..58d4b20b5b97 100644
@@ -96,6 +96,6 @@ enum drm_color_lut_tests {
 	DRM_COLOR_LUT_NON_DECREASING = BIT(1),
 };
 
Quoted 8 lines

include/drm/drm_color_mgmt.h enum drm_color_lut_tests { · line 100

Quoted 4 lines
include/drm/drm_color_mgmt.h +2 -2
-int drm_color_lut_check(struct drm_property_blob *lut,
-			uint32_t tests);
+int drm_color_lut_check(const struct drm_property_blob *lut,
+			u32 tests);

Likewise.

With the linewrap fixed:

Thanks.

Quoted 2 lines

Note: does not apply to my drm-misc tree. Anything I miss here?

I think it was merged via drm-intel.

Signature · 6 lines
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Acked-by
#3 lore raw
Quoted 55 lines · Ville Syrjälä
Quoted 45 lines · Sam Ravnborg

Hi Ville.

Quoted 19 lines · Ville Syrjala

From: Ville Syrjälä <[email protected]>

drm_color_lut_check() doens't modify the passed in blob so let's make it const.

Also s/uint32_y/u32/ while at it.

---
 drivers/gpu/drm/drm_color_mgmt.c | 6 +++---
 include/drm/drm_color_mgmt.h     | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)
drivers/gpu/drm/drm_color_mgmt.c +0 -0
index 968ca7c91ad8..3c8826a91a03 100644

drivers/gpu/drm/drm_color_mgmt.c EXPORT_SYMBOL(drm_plane_create_color_properties); · line 478

Quoted 7 lines
drivers/gpu/drm/drm_color_mgmt.c +2 -2
@@ -474,10 +474,10 @@ EXPORT_SYMBOL(drm_plane_create_color_properties);
  *
  * Returns 0 on success, -EINVAL on failure.
  */
-int drm_color_lut_check(struct drm_property_blob *lut,
-			uint32_t tests)
+int drm_color_lut_check(const struct drm_property_blob *lut,
+			u32 tests)

No need to linewrap this line.

Quoted 14 lines
drivers/gpu/drm/drm_color_mgmt.c +1 -1
 {
-	struct drm_color_lut *entry;
+	const struct drm_color_lut *entry;
 	int i;
 
 	if (!lut || !tests)
include/drm/drm_color_mgmt.h +0 -0
index 6affbda6d9cb..58d4b20b5b97 100644
@@ -96,6 +96,6 @@ enum drm_color_lut_tests {
 	DRM_COLOR_LUT_NON_DECREASING = BIT(1),
 };
 
Quoted 8 lines

include/drm/drm_color_mgmt.h enum drm_color_lut_tests { · line 100

Quoted 4 lines
include/drm/drm_color_mgmt.h +2 -2
-int drm_color_lut_check(struct drm_property_blob *lut,
-			uint32_t tests);
+int drm_color_lut_check(const struct drm_property_blob *lut,
+			u32 tests);

Likewise.

With the linewrap fixed:

Quoted 6 lines

Thanks.

Quoted 2 lines

Note: does not apply to my drm-misc tree. Anything I miss here?

I think it was merged via drm-intel.

for merging through drm-intel then (assuming it goes in before the merge cutoff), with Sam's suggestions ofc.
-Daniel

Quoted 8 lines
Signature · 7 lines
-- 
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#4 lore raw
Quoted 59 lines · Daniel Vetter
Quoted 58 lines · Ville Syrjälä
Quoted 45 lines · Sam Ravnborg

Hi Ville.

Quoted 19 lines · Ville Syrjala

From: Ville Syrjälä <[email protected]>

drm_color_lut_check() doens't modify the passed in blob so let's make it const.

Also s/uint32_y/u32/ while at it.

---
 drivers/gpu/drm/drm_color_mgmt.c | 6 +++---
 include/drm/drm_color_mgmt.h     | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)
drivers/gpu/drm/drm_color_mgmt.c +0 -0
index 968ca7c91ad8..3c8826a91a03 100644

drivers/gpu/drm/drm_color_mgmt.c EXPORT_SYMBOL(drm_plane_create_color_properties); · line 478

Quoted 7 lines
drivers/gpu/drm/drm_color_mgmt.c +2 -2
@@ -474,10 +474,10 @@ EXPORT_SYMBOL(drm_plane_create_color_properties);
  *
  * Returns 0 on success, -EINVAL on failure.
  */
-int drm_color_lut_check(struct drm_property_blob *lut,
-			uint32_t tests)
+int drm_color_lut_check(const struct drm_property_blob *lut,
+			u32 tests)

No need to linewrap this line.

Quoted 14 lines
drivers/gpu/drm/drm_color_mgmt.c +1 -1
 {
-	struct drm_color_lut *entry;
+	const struct drm_color_lut *entry;
 	int i;
 
 	if (!lut || !tests)
include/drm/drm_color_mgmt.h +0 -0
index 6affbda6d9cb..58d4b20b5b97 100644
@@ -96,6 +96,6 @@ enum drm_color_lut_tests {
 	DRM_COLOR_LUT_NON_DECREASING = BIT(1),
 };
 
Quoted 8 lines

include/drm/drm_color_mgmt.h enum drm_color_lut_tests { · line 100

Quoted 4 lines
include/drm/drm_color_mgmt.h +2 -2
-int drm_color_lut_check(struct drm_property_blob *lut,
-			uint32_t tests);
+int drm_color_lut_check(const struct drm_property_blob *lut,
+			u32 tests);

Likewise.

With the linewrap fixed:

Thanks.

Quoted 1 line
Quoted 8 lines
Quoted 3 lines
Quoted 1 line

Note: does not apply to my drm-misc tree. Anything I miss here?

I think it was merged via drm-intel.

for merging through drm-intel then (assuming it goes in before the merge cutoff), with Sam's suggestions ofc.

Fixed up and pushed to dinq. Thanks for the review.

Signature · 6 lines
Ville Syrjälä
Intel
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#5 lore raw

✓ Fi.CI.BAT: success for drm: Constify drm_color_lut_check()

In reply to Ville Syrjala
== Series Details ==

== Series Details ==

Series: drm: Constify drm_color_lut_check()
URL : https://patchwork.freedesktop.org/series/55924/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5501 -> Patchwork_12076
====================================================

Summary
-------

**SUCCESS**

No regressions found.

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

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

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

### IGT changes ###

#### Issues hit ####

* igt@amdgpu/amd_basic@userptr:
- fi-kbl-8809g: PASS -> DMESG-WARN [fdo#108965]

* igt@kms_busy@basic-flip-a:
- fi-gdg-551: NOTRUN -> FAIL [fdo#103182] +1

* igt@kms_pipe_crc_basic@nonblocking-crc-pipe-a:
- fi-byt-clapper: PASS -> FAIL [fdo#107362]

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

#### Possible fixes ####

* igt@kms_pipe_crc_basic@nonblocking-crc-pipe-b-frame-sequence:
- fi-byt-clapper: FAIL [fdo#103191] / [fdo#107362] -> PASS +1

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

[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#108915]: https://bugs.freedesktop.org/show_bug.cgi?id=108915
[fdo#108965]: https://bugs.freedesktop.org/show_bug.cgi?id=108965
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278

Participating hosts (46 -> 41)
------------------------------

Additional (2): fi-icl-y fi-gdg-551
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
-------------

* Linux: CI_DRM_5501 -> Patchwork_12076

CI_DRM_5501: 5aac0b69f3a3085b9b8a9924cb19cb94f7860dbe @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4798: 998e0a4aedf10fb5f7c271018cd80d874668bf55 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_12076: 4c5ebfc18c9220e99fa8eac8a5abcaec8c0e2ba6 @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

4c5ebfc18c92 drm: Constify drm_color_lut_check()

== Logs ==

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

Reviewed-by on v1 1/1
#6 lore raw
In reply to Ville Syrjala
Quoted 3 lines · Ville Syrjala

From: Ville Syrjälä <[email protected]>

drm_color_lut_check() doens't modify the passed in blob so

s/doens't/doesn't/

Otherwise, LGTM.

Quoted 49 lines

let's make it const.

Also s/uint32_y/u32/ while at it.

---
 drivers/gpu/drm/drm_color_mgmt.c | 6 +++---
 include/drm/drm_color_mgmt.h     | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)
drivers/gpu/drm/drm_color_mgmt.c +3 -3
index 968ca7c91ad8..3c8826a91a03 100644
@@ -474,10 +474,10 @@ EXPORT_SYMBOL(drm_plane_create_color_properties);
  *
  * Returns 0 on success, -EINVAL on failure.
  */
-int drm_color_lut_check(struct drm_property_blob *lut,
-			uint32_t tests)
+int drm_color_lut_check(const struct drm_property_blob *lut,
+			u32 tests)
 {
-	struct drm_color_lut *entry;
+	const struct drm_color_lut *entry;
 	int i;
 
 	if (!lut || !tests)
include/drm/drm_color_mgmt.h +2 -2
index 6affbda6d9cb..58d4b20b5b97 100644
@@ -96,6 +96,6 @@ enum drm_color_lut_tests {
 	DRM_COLOR_LUT_NON_DECREASING = BIT(1),
 };
 
-int drm_color_lut_check(struct drm_property_blob *lut,
-			uint32_t tests);
+int drm_color_lut_check(const struct drm_property_blob *lut,
+			u32 tests);
 #endif
Signature · 6 lines
2.19.2

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

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

#7 lore raw

✓ Fi.CI.IGT: success for drm: Constify drm_color_lut_check()

In reply to Ville Syrjala
== Series Details ==

== Series Details ==

Series: drm: Constify drm_color_lut_check()
URL : https://patchwork.freedesktop.org/series/55924/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5501_full -> Patchwork_12076_full
====================================================

Summary
-------

**SUCCESS**

No regressions found.

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

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

### IGT changes ###

#### Issues hit ####

* igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-b:
- shard-snb: NOTRUN -> DMESG-WARN [fdo#107956]

* igt@kms_color@pipe-b-degamma:
- shard-apl: PASS -> FAIL [fdo#104782]

* igt@kms_cursor_crc@cursor-256x85-sliding:
- shard-apl: PASS -> FAIL [fdo#103232] +2

* igt@kms_cursor_crc@cursor-64x21-onscreen:
- shard-glk: PASS -> FAIL [fdo#103232] +1

* igt@kms_plane@pixel-format-pipe-a-planes:
- shard-glk: PASS -> FAIL [fdo#103166]

* igt@kms_plane@pixel-format-pipe-c-planes-source-clamping:
- shard-apl: PASS -> FAIL [fdo#108948]

* igt@kms_plane@plane-position-covered-pipe-c-planes:
- shard-apl: PASS -> FAIL [fdo#103166] +2

* igt@kms_plane_alpha_blend@pipe-c-constant-alpha-max:
- shard-apl: PASS -> FAIL [fdo#108145]

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

#### Possible fixes ####

* igt@kms_color@pipe-b-ctm-max:
- shard-apl: FAIL [fdo#108147] -> PASS

* igt@kms_cursor_crc@cursor-256x256-random:
- shard-glk: FAIL [fdo#103232] -> PASS +1

* igt@kms_cursor_crc@cursor-256x256-suspend:
- shard-apl: FAIL [fdo#103191] / [fdo#103232] -> PASS

* igt@kms_cursor_crc@cursor-64x21-random:
- shard-apl: FAIL [fdo#103232] -> PASS +5

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

* igt@kms_plane_multiple@atomic-pipe-b-tiling-x:
- shard-apl: FAIL [fdo#103166] -> PASS +1

* igt@kms_plane_multiple@atomic-pipe-c-tiling-x:
- shard-glk: FAIL [fdo#103166] -> PASS

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

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

* igt@prime_busy@hang-bsd:
- shard-hsw: FAIL [fdo#108807] -> PASS

#### Warnings ####

* igt@i915_suspend@shrink:
- shard-glk: DMESG-WARN [fdo#109244] -> INCOMPLETE [fdo#103359] / [fdo#106886] / [k.org#198133]

{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#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
[fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
[fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
[fdo#103359]: https://bugs.freedesktop.org/show_bug.cgi?id=103359
[fdo#104782]: https://bugs.freedesktop.org/show_bug.cgi?id=104782
[fdo#105010]: https://bugs.freedesktop.org/show_bug.cgi?id=105010
[fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
[fdo#106886]: https://bugs.freedesktop.org/show_bug.cgi?id=106886
[fdo#107956]: https://bugs.freedesktop.org/show_bug.cgi?id=107956
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#108147]: https://bugs.freedesktop.org/show_bug.cgi?id=108147
[fdo#108807]: https://bugs.freedesktop.org/show_bug.cgi?id=108807
[fdo#108948]: https://bugs.freedesktop.org/show_bug.cgi?id=108948
[fdo#109244]: https://bugs.freedesktop.org/show_bug.cgi?id=109244
[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
[k.org#198133]: https://bugzilla.kernel.org/show_bug.cgi?id=198133

Participating hosts (7 -> 5)
------------------------------

Missing (2): shard-skl shard-iclb

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

* Linux: CI_DRM_5501 -> Patchwork_12076

CI_DRM_5501: 5aac0b69f3a3085b9b8a9924cb19cb94f7860dbe @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4798: 998e0a4aedf10fb5f7c271018cd80d874668bf55 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_12076: 4c5ebfc18c9220e99fa8eac8a5abcaec8c0e2ba6 @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

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