<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/gpu/drm/sti, branch v5.4.267</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v5.4.267</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v5.4.267'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2023-01-18T10:41:39+00:00</updated>
<entry>
<title>drm/sti: Fix return type of sti_{dvo,hda,hdmi}_connector_mode_valid()</title>
<updated>2023-01-18T10:41:39+00:00</updated>
<author>
<name>Nathan Chancellor</name>
<email>nathan@kernel.org</email>
</author>
<published>2022-11-02T15:56:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=511b48ee8e4aec2d03d2af06b363d9eb3230b017'/>
<id>urn:sha1:511b48ee8e4aec2d03d2af06b363d9eb3230b017</id>
<content type='text'>
[ Upstream commit 0ad811cc08a937d875cbad0149c1bab17f84ba05 ]

With clang's kernel control flow integrity (kCFI, CONFIG_CFI_CLANG),
indirect call targets are validated against the expected function
pointer prototype to make sure the call target is valid to help mitigate
ROP attacks. If they are not identical, there is a failure at run time,
which manifests as either a kernel panic or thread getting killed. A
proposed warning in clang aims to catch these at compile time, which
reveals:

  drivers/gpu/drm/sti/sti_hda.c:637:16: error: incompatible function pointer types initializing 'enum drm_mode_status (*)(struct drm_connector *, struct drm_display_mode *)' with an expression of type 'int (struct drm_connector *, struct drm_display_mode *)' [-Werror,-Wincompatible-function-pointer-types-strict]
          .mode_valid = sti_hda_connector_mode_valid,
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
  drivers/gpu/drm/sti/sti_dvo.c:376:16: error: incompatible function pointer types initializing 'enum drm_mode_status (*)(struct drm_connector *, struct drm_display_mode *)' with an expression of type 'int (struct drm_connector *, struct drm_display_mode *)' [-Werror,-Wincompatible-function-pointer-types-strict]
          .mode_valid = sti_dvo_connector_mode_valid,
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
  drivers/gpu/drm/sti/sti_hdmi.c:1035:16: error: incompatible function pointer types initializing 'enum drm_mode_status (*)(struct drm_connector *, struct drm_display_mode *)' with an expression of type 'int (struct drm_connector *, struct drm_display_mode *)' [-Werror,-Wincompatible-function-pointer-types-strict]
          .mode_valid = sti_hdmi_connector_mode_valid,
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

-&gt;mode_valid() in 'struct drm_connector_helper_funcs' expects a return
type of 'enum drm_mode_status', not 'int'. Adjust the return type of
sti_{dvo,hda,hdmi}_connector_mode_valid() to match the prototype's to
resolve the warning and CFI failure.

Link: https://github.com/ClangBuiltLinux/linux/issues/1750
Signed-off-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
Reviewed-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Link: https://lore.kernel.org/r/20221102155623.3042869-1-nathan@kernel.org
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/sti: Use drm_mode_copy()</title>
<updated>2023-01-18T10:41:36+00:00</updated>
<author>
<name>Ville Syrjälä</name>
<email>ville.syrjala@linux.intel.com</email>
</author>
<published>2022-11-07T19:25:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2b1b145ca17b3b9f08b955167c6c09157b84f1c6'/>
<id>urn:sha1:2b1b145ca17b3b9f08b955167c6c09157b84f1c6</id>
<content type='text'>
[ Upstream commit 442cf8e22ba25a77cb9092d78733fdbac9844e50 ]

struct drm_display_mode embeds a list head, so overwriting
the full struct with another one will corrupt the list
(if the destination mode is on a list). Use drm_mode_copy()
instead which explicitly preserves the list head of
the destination mode.

Even if we know the destination mode is not on any list
using drm_mode_copy() seems decent as it sets a good
example. Bad examples of not using it might eventually
get copied into code where preserving the list head
actually matters.

Obviously one case not covered here is when the mode
itself is embedded in a larger structure and the whole
structure is copied. But if we are careful when copying
into modes embedded in structures I think we can be a
little more reassured that bogus list heads haven't been
propagated in.

@is_mode_copy@
@@
drm_mode_copy(...)
{
...
}

@depends on !is_mode_copy@
struct drm_display_mode *mode;
expression E, S;
@@
(
- *mode = E
+ drm_mode_copy(mode, &amp;E)
|
- memcpy(mode, E, S)
+ drm_mode_copy(mode, E)
)

@depends on !is_mode_copy@
struct drm_display_mode mode;
expression E;
@@
(
- mode = E
+ drm_mode_copy(&amp;mode, &amp;E)
|
- memcpy(&amp;mode, E, S)
+ drm_mode_copy(&amp;mode, E)
)

@@
struct drm_display_mode *mode;
@@
- &amp;*mode
+ mode

Cc: Alain Volmat &lt;alain.volmat@foss.st.com&gt;
Signed-off-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20221107192545.9896-8-ville.syrjala@linux.intel.com
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/sti: fix opencoded use of drm_panel_*</title>
<updated>2019-08-07T11:54:17+00:00</updated>
<author>
<name>Sam Ravnborg</name>
<email>sam@ravnborg.org</email>
</author>
<published>2019-08-04T20:16:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fcfce9f354769b060e82bccc05b8fa2956eb1b04'/>
<id>urn:sha1:fcfce9f354769b060e82bccc05b8fa2956eb1b04</id>
<content type='text'>
Use the drm_panel_(enable|disable|get_modes) functions.

Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Cc: Benjamin Gaignard &lt;benjamin.gaignard@linaro.org&gt;
Cc: Vincent Abriou &lt;vincent.abriou@st.com&gt;
Signed-off-by: Benjamin Gaignard &lt;benjamin.gaignard@linaro.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20190804201637.1240-9-sam@ravnborg.org
</content>
</entry>
<entry>
<title>drm: sti: Provide ddc symlink in hdmi connector sysfs directory</title>
<updated>2019-07-31T14:32:38+00:00</updated>
<author>
<name>Andrzej Pietrasiewicz</name>
<email>andrzej.p@collabora.com</email>
</author>
<published>2019-07-26T17:23:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7058e76682d762e211e7681155c5e11709182271'/>
<id>urn:sha1:7058e76682d762e211e7681155c5e11709182271</id>
<content type='text'>
Use the ddc pointer provided by the generic connector.

Signed-off-by: Andrzej Pietrasiewicz &lt;andrzej.p@collabora.com&gt;
Reviewed-by: Benjamin Gaignard &lt;benjamin.gaignard@linaro.org&gt;
Acked-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Reviewed-by: Emil Velikov &lt;emil.velikov@collabora.com&gt;
Signed-off-by: Neil Armstrong &lt;narmstrong@baylibre.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/510765aff8ef99683aa2da48bd08004376b1980a.1564161140.git.andrzej.p@collabora.com
</content>
</entry>
<entry>
<title>drm: sti: Mark expected switch fall-throughs</title>
<updated>2019-07-30T09:35:40+00:00</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavo@embeddedor.com</email>
</author>
<published>2019-07-29T22:27:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4de09ffcf4f622876668b76c8e416f4143b32a9e'/>
<id>urn:sha1:4de09ffcf4f622876668b76c8e416f4143b32a9e</id>
<content type='text'>
Mark switch cases where we are expecting to fall through.

This patch fixes the following warning (Building: arm):

drivers/gpu/drm/sti/sti_hdmi.c: In function ‘hdmi_audio_configure’:
drivers/gpu/drm/sti/sti_hdmi.c:851:13: warning: this statement may fall through [-Wimplicit-fallthrough=]
   audio_cfg |= HDMI_AUD_CFG_CH78_VALID;
drivers/gpu/drm/sti/sti_hdmi.c:852:2: note: here
  case 6:
  ^~~~
drivers/gpu/drm/sti/sti_hdmi.c:853:13: warning: this statement may fall through [-Wimplicit-fallthrough=]
   audio_cfg |= HDMI_AUD_CFG_CH56_VALID;
drivers/gpu/drm/sti/sti_hdmi.c:854:2: note: here
  case 4:
  ^~~~
drivers/gpu/drm/sti/sti_hdmi.c:855:13: warning: this statement may fall through [-Wimplicit-fallthrough=]
   audio_cfg |= HDMI_AUD_CFG_CH34_VALID | HDMI_AUD_CFG_8CH;
drivers/gpu/drm/sti/sti_hdmi.c:856:2: note: here
  case 2:
  ^~~~

Signed-off-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
Signed-off-by: Benjamin Gaignard &lt;benjamin.gaignard@linaro.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20190729222752.GA20277@embeddedor
</content>
</entry>
<entry>
<title>drm/sti: Try to fix up the tvout possible clones</title>
<updated>2019-07-09T07:45:07+00:00</updated>
<author>
<name>Ville Syrjälä</name>
<email>ville.syrjala@linux.intel.com</email>
</author>
<published>2019-07-08T16:20:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=113348d86cebbf9fb07e190e6075562ee431eb15'/>
<id>urn:sha1:113348d86cebbf9fb07e190e6075562ee431eb15</id>
<content type='text'>
The current possible_clones setup doesn't look sensible. I'm assuming
the 0 and 1 are supposed to refer to the indexes of the hdmi and hda
encoders? So it kinda looks like we want hda+hdmi cloning, but then
dvo also claims to be cloneable with hdmi, but hdmi won't recipricate.

Benjamin tells me all encoders should be cloneable with each other,
so let's fix up the masks to indicate that.

Cc: Benjamin Gaignard &lt;benjamin.gaignard@linaro.org&gt;
Cc: Vincent Abriou &lt;vincent.abriou@st.com&gt;
Acked-by: Benjamin Gaignard &lt;benjamin.gaignard@linaro.org&gt;
Signed-off-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Signed-off-by: Benjamin Gaignard &lt;benjamin.gaignard@linaro.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20190708162048.4286-5-ville.syrjala@linux.intel.com
</content>
</entry>
<entry>
<title>drm/sti: Remove pointless casts</title>
<updated>2019-07-09T07:44:25+00:00</updated>
<author>
<name>Ville Syrjälä</name>
<email>ville.syrjala@linux.intel.com</email>
</author>
<published>2019-07-08T16:20:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6234ba980f89b396221f77788a9bb36e79900391'/>
<id>urn:sha1:6234ba980f89b396221f77788a9bb36e79900391</id>
<content type='text'>
There's no point in the cast for accessing the base class. Just
take the address of the struct instead.

Cc: Benjamin Gaignard &lt;benjamin.gaignard@linaro.org&gt;
Cc: Vincent Abriou &lt;vincent.abriou@st.com&gt;
Acked-by: Benjamin Gaignard &lt;benjamin.gaignard@linaro.org&gt;
Signed-off-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Signed-off-by: Benjamin Gaignard &lt;benjamin.gaignard@linaro.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20190708162048.4286-4-ville.syrjala@linux.intel.com
</content>
</entry>
<entry>
<title>drm/sti: Drop drm_gem_prime_export/import</title>
<updated>2019-06-21T18:09:47+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2019-06-14T20:35:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=03988e4fa15689da0ab954457c8578773c6e05b6'/>
<id>urn:sha1:03988e4fa15689da0ab954457c8578773c6e05b6</id>
<content type='text'>
They're the default.

Aside: Would be really nice to switch the others over to
drm_gem_object_funcs.

Reviewed-by: Eric Anholt &lt;eric@anholt.net&gt;
Reviewed-by: Emil Velikov &lt;emil.velikov@collabora.com&gt;
Reviewed-by: Benjamin Gaignard &lt;benjamin.gaignard@linaro.org&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Cc: Benjamin Gaignard &lt;benjamin.gaignard@linaro.org&gt;
Cc: Vincent Abriou &lt;vincent.abriou@st.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20190614203615.12639-30-daniel.vetter@ffwll.ch
</content>
</entry>
<entry>
<title>drm/prime: Actually remove DRIVER_PRIME everywhere</title>
<updated>2019-06-21T15:30:32+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2019-06-17T15:39:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0424fdaf883a689d5185c0d0665b265373945898'/>
<id>urn:sha1:0424fdaf883a689d5185c0d0665b265373945898</id>
<content type='text'>
Split out to make the functional changes stick out more.

All places where DRIVER_PRIME was used have been removed in previous
patches already.

v2: amdgpu gained DRIVER_SYNCOBJ_TIMELINE.

v3: amdgpu lost DRIVER_SYNCOBJ_TIMELINE.

v4: Don't add a space in i915_drv.c (Sam)

v5: Add note that previous patches removed all the DRIVER_PRIME users
already (Emil).

v6: Fixupe ingenic (new driver) while applying.

Cc: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Reviewed-by: Emil Velikov &lt;emil.velikov@collabora.com&gt;
Reviewed-by: Eric Anholt &lt;eric@anholt.net&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Cc: amd-gfx@lists.freedesktop.org
Cc: etnaviv@lists.freedesktop.org
Cc: freedreno@lists.freedesktop.org
Cc: intel-gfx@lists.freedesktop.org
Cc: lima@lists.freedesktop.org
Cc: linux-amlogic@lists.infradead.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-arm-msm@vger.kernel.org
Cc: linux-aspeed@lists.ozlabs.org
Cc: linux-renesas-soc@vger.kernel.org
Cc: linux-rockchip@lists.infradead.org
Cc: linux-samsung-soc@vger.kernel.org
Cc: linux-stm32@st-md-mailman.stormreply.com
Cc: linux-tegra@vger.kernel.org
Cc: nouveau@lists.freedesktop.org
Cc: NXP Linux Team &lt;linux-imx@nxp.com&gt;
Cc: spice-devel@lists.freedesktop.org
Cc: virtualization@lists.linux-foundation.org
Cc: VMware Graphics &lt;linux-graphics-maintainer@vmware.com&gt;
Cc: xen-devel@lists.xenproject.org
Link: https://patchwork.freedesktop.org/patch/msgid/20190617153924.414-1-daniel.vetter@ffwll.ch
</content>
</entry>
<entry>
<title>drm/sti: Remove duplicated include from sti_drv.c</title>
<updated>2019-06-21T09:38:45+00:00</updated>
<author>
<name>YueHaibing</name>
<email>yuehaibing@huawei.com</email>
</author>
<published>2019-06-20T15:03:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b8142e3a63dad1e2b7a71a539d73c02d4d0c1353'/>
<id>urn:sha1:b8142e3a63dad1e2b7a71a539d73c02d4d0c1353</id>
<content type='text'>
Remove duplicated include.

Signed-off-by: YueHaibing &lt;yuehaibing@huawei.com&gt;
Signed-off-by: Benjamin Gaignard &lt;benjamin.gaignard@linaro.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20190620150306.124839-1-yuehaibing@huawei.com
</content>
</entry>
</feed>
