* [PATCH] drm/i915/audio: constify ELD pointers
@ 2018-06-19 12:44 Jani Nikula
2018-06-19 12:55 ` ✗ Fi.CI.SPARSE: warning for " Patchwork
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Jani Nikula @ 2018-06-19 12:44 UTC (permalink / raw)
To: intel-gfx; +Cc: jani.nikula
The hooks aren't supposed to modify the ELD, so use const pointer. As a
drive-by fix, use drm_eld_size() to log ELD size.
Suggested-by: Ville Syrjala <ville.syrjala@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/i915/intel_audio.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_audio.c b/drivers/gpu/drm/i915/intel_audio.c
index a34aa66f28f8..bb94172ffc07 100644
--- a/drivers/gpu/drm/i915/intel_audio.c
+++ b/drivers/gpu/drm/i915/intel_audio.c
@@ -213,7 +213,7 @@ static bool intel_eld_uptodate(struct drm_connector *connector,
i915_reg_t reg_edid)
{
struct drm_i915_private *dev_priv = to_i915(connector->dev);
- u8 *eld = connector->eld;
+ const u8 *eld = connector->eld;
u32 tmp;
int i;
@@ -228,7 +228,7 @@ static bool intel_eld_uptodate(struct drm_connector *connector,
I915_WRITE(reg_elda, tmp);
for (i = 0; i < drm_eld_size(eld) / 4; i++)
- if (I915_READ(reg_edid) != *((u32 *)eld + i))
+ if (I915_READ(reg_edid) != *((const u32 *)eld + i))
return false;
return true;
@@ -261,12 +261,12 @@ static void g4x_audio_codec_enable(struct intel_encoder *encoder,
{
struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
struct drm_connector *connector = conn_state->connector;
- u8 *eld = connector->eld;
+ const u8 *eld = connector->eld;
u32 eldv;
u32 tmp;
int len, i;
- DRM_DEBUG_KMS("Enable audio codec, %u bytes ELD\n", eld[2]);
+ DRM_DEBUG_KMS("Enable audio codec, %u bytes ELD\n", drm_eld_size(eld));
tmp = I915_READ(G4X_AUD_VID_DID);
if (tmp == INTEL_AUDIO_DEVBLC || tmp == INTEL_AUDIO_DEVCL)
@@ -288,7 +288,7 @@ static void g4x_audio_codec_enable(struct intel_encoder *encoder,
len = min(drm_eld_size(eld) / 4, len);
DRM_DEBUG_DRIVER("ELD size %d\n", len);
for (i = 0; i < len; i++)
- I915_WRITE(G4X_HDMIW_HDMIEDID, *((u32 *)eld + i));
+ I915_WRITE(G4X_HDMIW_HDMIEDID, *((const u32 *)eld + i));
tmp = I915_READ(G4X_AUD_CNTL_ST);
tmp |= eldv;
@@ -466,7 +466,7 @@ static void hsw_audio_codec_enable(struct intel_encoder *encoder,
/* Up to 84 bytes of hw ELD buffer */
len = min(drm_eld_size(eld), 84);
for (i = 0; i < len / 4; i++)
- I915_WRITE(HSW_AUD_EDID_DATA(pipe), *((u32 *)eld + i));
+ I915_WRITE(HSW_AUD_EDID_DATA(pipe), *((const u32 *)eld + i));
/* ELD valid */
tmp = I915_READ(HSW_AUD_PIN_ELD_CP_VLD);
@@ -534,7 +534,7 @@ static void ilk_audio_codec_enable(struct intel_encoder *encoder,
struct drm_connector *connector = conn_state->connector;
enum pipe pipe = crtc->pipe;
enum port port = encoder->port;
- u8 *eld = connector->eld;
+ const u8 *eld = connector->eld;
u32 tmp, eldv;
int len, i;
i915_reg_t hdmiw_hdmiedid, aud_config, aud_cntl_st, aud_cntrl_st2;
@@ -585,7 +585,7 @@ static void ilk_audio_codec_enable(struct intel_encoder *encoder,
/* Up to 84 bytes of hw ELD buffer */
len = min(drm_eld_size(eld), 84);
for (i = 0; i < len / 4; i++)
- I915_WRITE(hdmiw_hdmiedid, *((u32 *)eld + i));
+ I915_WRITE(hdmiw_hdmiedid, *((const u32 *)eld + i));
/* ELD valid */
tmp = I915_READ(aud_cntrl_st2);
--
2.11.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 5+ messages in thread* ✗ Fi.CI.SPARSE: warning for drm/i915/audio: constify ELD pointers
2018-06-19 12:44 [PATCH] drm/i915/audio: constify ELD pointers Jani Nikula
@ 2018-06-19 12:55 ` Patchwork
2018-06-19 13:09 ` [PATCH] " Ville Syrjälä
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2018-06-19 12:55 UTC (permalink / raw)
To: Jani Nikula; +Cc: intel-gfx
== Series Details ==
Series: drm/i915/audio: constify ELD pointers
URL : https://patchwork.freedesktop.org/series/45014/
State : warning
== Summary ==
$ dim sparse origin/drm-tip
Commit: drm/i915/audio: constify ELD pointers
-O:drivers/gpu/drm/i915/intel_audio.c:288:15: warning: expression using sizeof(void)
-O:drivers/gpu/drm/i915/intel_audio.c:288:15: warning: expression using sizeof(void)
-O:drivers/gpu/drm/i915/intel_audio.c:467:15: warning: expression using sizeof(void)
-O:drivers/gpu/drm/i915/intel_audio.c:586:15: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/intel_audio.c:288:15: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/intel_audio.c:288:15: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/intel_audio.c:467:15: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/intel_audio.c:586:15: warning: expression using sizeof(void)
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] drm/i915/audio: constify ELD pointers
2018-06-19 12:44 [PATCH] drm/i915/audio: constify ELD pointers Jani Nikula
2018-06-19 12:55 ` ✗ Fi.CI.SPARSE: warning for " Patchwork
@ 2018-06-19 13:09 ` Ville Syrjälä
2018-06-19 13:14 ` ✓ Fi.CI.BAT: success for " Patchwork
2018-06-19 14:06 ` ✓ Fi.CI.IGT: " Patchwork
3 siblings, 0 replies; 5+ messages in thread
From: Ville Syrjälä @ 2018-06-19 13:09 UTC (permalink / raw)
To: Jani Nikula; +Cc: intel-gfx
On Tue, Jun 19, 2018 at 03:44:37PM +0300, Jani Nikula wrote:
> The hooks aren't supposed to modify the ELD, so use const pointer. As a
> drive-by fix, use drm_eld_size() to log ELD size.
>
> Suggested-by: Ville Syrjala <ville.syrjala@linux.intel.com>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/i915/intel_audio.c | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_audio.c b/drivers/gpu/drm/i915/intel_audio.c
> index a34aa66f28f8..bb94172ffc07 100644
> --- a/drivers/gpu/drm/i915/intel_audio.c
> +++ b/drivers/gpu/drm/i915/intel_audio.c
> @@ -213,7 +213,7 @@ static bool intel_eld_uptodate(struct drm_connector *connector,
> i915_reg_t reg_edid)
> {
> struct drm_i915_private *dev_priv = to_i915(connector->dev);
> - u8 *eld = connector->eld;
> + const u8 *eld = connector->eld;
> u32 tmp;
> int i;
>
> @@ -228,7 +228,7 @@ static bool intel_eld_uptodate(struct drm_connector *connector,
> I915_WRITE(reg_elda, tmp);
>
> for (i = 0; i < drm_eld_size(eld) / 4; i++)
> - if (I915_READ(reg_edid) != *((u32 *)eld + i))
> + if (I915_READ(reg_edid) != *((const u32 *)eld + i))
I was hoping we could make it const u32* and kill these ugly casts.
But I suppose that would require more casts for the drm_eld_size() & co.,
or changing those to take a const void* instead.
Anyways, the const alone is an improvement so
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> return false;
>
> return true;
> @@ -261,12 +261,12 @@ static void g4x_audio_codec_enable(struct intel_encoder *encoder,
> {
> struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> struct drm_connector *connector = conn_state->connector;
> - u8 *eld = connector->eld;
> + const u8 *eld = connector->eld;
> u32 eldv;
> u32 tmp;
> int len, i;
>
> - DRM_DEBUG_KMS("Enable audio codec, %u bytes ELD\n", eld[2]);
> + DRM_DEBUG_KMS("Enable audio codec, %u bytes ELD\n", drm_eld_size(eld));
>
> tmp = I915_READ(G4X_AUD_VID_DID);
> if (tmp == INTEL_AUDIO_DEVBLC || tmp == INTEL_AUDIO_DEVCL)
> @@ -288,7 +288,7 @@ static void g4x_audio_codec_enable(struct intel_encoder *encoder,
> len = min(drm_eld_size(eld) / 4, len);
> DRM_DEBUG_DRIVER("ELD size %d\n", len);
> for (i = 0; i < len; i++)
> - I915_WRITE(G4X_HDMIW_HDMIEDID, *((u32 *)eld + i));
> + I915_WRITE(G4X_HDMIW_HDMIEDID, *((const u32 *)eld + i));
>
> tmp = I915_READ(G4X_AUD_CNTL_ST);
> tmp |= eldv;
> @@ -466,7 +466,7 @@ static void hsw_audio_codec_enable(struct intel_encoder *encoder,
> /* Up to 84 bytes of hw ELD buffer */
> len = min(drm_eld_size(eld), 84);
> for (i = 0; i < len / 4; i++)
> - I915_WRITE(HSW_AUD_EDID_DATA(pipe), *((u32 *)eld + i));
> + I915_WRITE(HSW_AUD_EDID_DATA(pipe), *((const u32 *)eld + i));
>
> /* ELD valid */
> tmp = I915_READ(HSW_AUD_PIN_ELD_CP_VLD);
> @@ -534,7 +534,7 @@ static void ilk_audio_codec_enable(struct intel_encoder *encoder,
> struct drm_connector *connector = conn_state->connector;
> enum pipe pipe = crtc->pipe;
> enum port port = encoder->port;
> - u8 *eld = connector->eld;
> + const u8 *eld = connector->eld;
> u32 tmp, eldv;
> int len, i;
> i915_reg_t hdmiw_hdmiedid, aud_config, aud_cntl_st, aud_cntrl_st2;
> @@ -585,7 +585,7 @@ static void ilk_audio_codec_enable(struct intel_encoder *encoder,
> /* Up to 84 bytes of hw ELD buffer */
> len = min(drm_eld_size(eld), 84);
> for (i = 0; i < len / 4; i++)
> - I915_WRITE(hdmiw_hdmiedid, *((u32 *)eld + i));
> + I915_WRITE(hdmiw_hdmiedid, *((const u32 *)eld + i));
>
> /* ELD valid */
> tmp = I915_READ(aud_cntrl_st2);
> --
> 2.11.0
--
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread* ✓ Fi.CI.BAT: success for drm/i915/audio: constify ELD pointers
2018-06-19 12:44 [PATCH] drm/i915/audio: constify ELD pointers Jani Nikula
2018-06-19 12:55 ` ✗ Fi.CI.SPARSE: warning for " Patchwork
2018-06-19 13:09 ` [PATCH] " Ville Syrjälä
@ 2018-06-19 13:14 ` Patchwork
2018-06-19 14:06 ` ✓ Fi.CI.IGT: " Patchwork
3 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2018-06-19 13:14 UTC (permalink / raw)
To: Jani Nikula; +Cc: intel-gfx
== Series Details ==
Series: drm/i915/audio: constify ELD pointers
URL : https://patchwork.freedesktop.org/series/45014/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4341 -> Patchwork_9358 =
== Summary - SUCCESS ==
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/45014/revisions/1/mbox/
== Known issues ==
Here are the changes found in Patchwork_9358 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@drv_module_reload@basic-no-display:
fi-cnl-psr: NOTRUN -> DMESG-WARN (fdo#105395) +2
igt@gem_ctx_create@basic-files:
fi-skl-guc: PASS -> DMESG-WARN (fdo#106954)
igt@gem_exec_gttfill@basic:
fi-byt-n2820: PASS -> FAIL (fdo#106744)
igt@kms_frontbuffer_tracking@basic:
fi-hsw-peppy: PASS -> DMESG-FAIL (fdo#106103, fdo#102614)
igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
fi-skl-6700k2: PASS -> INCOMPLETE (fdo#104108, k.org#199541, fdo#105524)
==== Possible fixes ====
igt@kms_flip@basic-flip-vs-dpms:
fi-glk-j4005: DMESG-WARN (fdo#106000, fdo#106097) -> PASS
igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
fi-cnl-psr: INCOMPLETE (fdo#105086) -> PASS
fi-glk-j4005: DMESG-WARN (fdo#106097) -> PASS +1
fdo#102614 https://bugs.freedesktop.org/show_bug.cgi?id=102614
fdo#104108 https://bugs.freedesktop.org/show_bug.cgi?id=104108
fdo#105086 https://bugs.freedesktop.org/show_bug.cgi?id=105086
fdo#105395 https://bugs.freedesktop.org/show_bug.cgi?id=105395
fdo#105524 https://bugs.freedesktop.org/show_bug.cgi?id=105524
fdo#106000 https://bugs.freedesktop.org/show_bug.cgi?id=106000
fdo#106097 https://bugs.freedesktop.org/show_bug.cgi?id=106097
fdo#106103 https://bugs.freedesktop.org/show_bug.cgi?id=106103
fdo#106744 https://bugs.freedesktop.org/show_bug.cgi?id=106744
fdo#106954 https://bugs.freedesktop.org/show_bug.cgi?id=106954
k.org#199541 https://bugzilla.kernel.org/show_bug.cgi?id=199541
== Participating hosts (43 -> 38) ==
Missing (5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-hsw-4200u
== Build changes ==
* Linux: CI_DRM_4341 -> Patchwork_9358
CI_DRM_4341: 1a2269d72a9a9f67fa83d799df63c98004faa2f1 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4523: 778497e7965dc8662c770a89ebbd741778feb71e @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_9358: d99a99702ca9a9176e45466ebc08dae4352a09c1 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
d99a99702ca9 drm/i915/audio: constify ELD pointers
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9358/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread* ✓ Fi.CI.IGT: success for drm/i915/audio: constify ELD pointers
2018-06-19 12:44 [PATCH] drm/i915/audio: constify ELD pointers Jani Nikula
` (2 preceding siblings ...)
2018-06-19 13:14 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2018-06-19 14:06 ` Patchwork
3 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2018-06-19 14:06 UTC (permalink / raw)
To: Jani Nikula; +Cc: intel-gfx
== Series Details ==
Series: drm/i915/audio: constify ELD pointers
URL : https://patchwork.freedesktop.org/series/45014/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4341_full -> Patchwork_9358_full =
== Summary - WARNING ==
Minor unknown changes coming with Patchwork_9358_full need to be verified
manually.
If you think the reported changes have nothing to do with the changes
introduced in Patchwork_9358_full, please notify your bug team to allow them
to document this new failure mode, which will reduce false positives in CI.
== Possible new issues ==
Here are the unknown changes that may have been introduced in Patchwork_9358_full:
=== IGT changes ===
==== Warnings ====
igt@drv_selftest@live_guc:
shard-kbl: SKIP -> PASS +1
== Known issues ==
Here are the changes found in Patchwork_9358_full that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@drv_selftest@live_hangcheck:
shard-apl: NOTRUN -> DMESG-FAIL (fdo#106560, fdo#106947)
shard-glk: PASS -> DMESG-FAIL (fdo#106560, fdo#106947)
igt@kms_cursor_legacy@2x-nonblocking-modeset-vs-cursor-atomic:
shard-glk: PASS -> FAIL (fdo#106509, fdo#105454)
igt@kms_flip@2x-plain-flip-ts-check:
shard-glk: PASS -> FAIL (fdo#100368)
igt@kms_flip_tiling@flip-to-y-tiled:
shard-glk: PASS -> FAIL (fdo#104724, fdo#103822)
igt@kms_setmode@basic:
shard-apl: PASS -> FAIL (fdo#99912)
==== Possible fixes ====
igt@drv_selftest@live_gtt:
shard-apl: INCOMPLETE (fdo#103927) -> PASS
igt@drv_suspend@shrink:
shard-snb: INCOMPLETE (fdo#105411) -> PASS +1
igt@kms_cursor_legacy@cursorb-vs-flipb-toggle:
shard-glk: DMESG-WARN (fdo#105763, fdo#106538) -> PASS
igt@kms_flip@2x-plain-flip-ts-check-interruptible:
shard-glk: FAIL (fdo#100368) -> PASS
igt@kms_flip@flip-vs-expired-vblank-interruptible:
shard-glk: FAIL (fdo#105189) -> PASS
igt@kms_flip@modeset-vs-vblank-race-interruptible:
shard-hsw: FAIL (fdo#103060) -> PASS
igt@kms_setmode@basic:
shard-kbl: FAIL (fdo#99912) -> PASS
fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#103060 https://bugs.freedesktop.org/show_bug.cgi?id=103060
fdo#103822 https://bugs.freedesktop.org/show_bug.cgi?id=103822
fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
fdo#104724 https://bugs.freedesktop.org/show_bug.cgi?id=104724
fdo#105189 https://bugs.freedesktop.org/show_bug.cgi?id=105189
fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411
fdo#105454 https://bugs.freedesktop.org/show_bug.cgi?id=105454
fdo#105763 https://bugs.freedesktop.org/show_bug.cgi?id=105763
fdo#106509 https://bugs.freedesktop.org/show_bug.cgi?id=106509
fdo#106538 https://bugs.freedesktop.org/show_bug.cgi?id=106538
fdo#106560 https://bugs.freedesktop.org/show_bug.cgi?id=106560
fdo#106947 https://bugs.freedesktop.org/show_bug.cgi?id=106947
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
== Participating hosts (5 -> 5) ==
No changes in participating hosts
== Build changes ==
* Linux: CI_DRM_4341 -> Patchwork_9358
CI_DRM_4341: 1a2269d72a9a9f67fa83d799df63c98004faa2f1 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4523: 778497e7965dc8662c770a89ebbd741778feb71e @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_9358: d99a99702ca9a9176e45466ebc08dae4352a09c1 @ 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_9358/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-06-19 14:06 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-19 12:44 [PATCH] drm/i915/audio: constify ELD pointers Jani Nikula
2018-06-19 12:55 ` ✗ Fi.CI.SPARSE: warning for " Patchwork
2018-06-19 13:09 ` [PATCH] " Ville Syrjälä
2018-06-19 13:14 ` ✓ Fi.CI.BAT: success for " Patchwork
2018-06-19 14:06 ` ✓ Fi.CI.IGT: " Patchwork
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.