Jani Nikula
242136edda
drm/radeon: convert to using is_hdmi and has_audio from display info
...
Prefer the parsed results for is_hdmi and has_audio in display info over
calling drm_detect_hdmi_monitor() and drm_detect_monitor_audio(),
respectively.
Cc: Alex Deucher <alexander.deucher@amd.com >
Cc: Christian König <christian.koenig@amd.com >
Cc: Pan
Cc: amd-gfx@lists.freedesktop.org
Reviewed-by: Robert Foss <rfoss@kernel.org >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/c4dfde81b98a4e938ef1e253b05550cad96e49be.1715353572.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-05-23 14:37:24 +03:00
Jani Nikula
444f396c62
drm/nouveau: convert to using is_hdmi and has_audio from display info
...
Prefer the parsed results for is_hdmi and has_audio in display info over
calling drm_detect_hdmi_monitor() and drm_detect_monitor_audio(),
respectively.
Conveniently, this also removes the need to use edid_blob_ptr.
v2: Reverse a backwards if condition (Ilia)
Cc: Karol Herbst <kherbst@redhat.com >
Cc: Lyude Paul <lyude@redhat.com >
Cc: Danilo Krummrich <dakr@redhat.com >
Cc: nouveau@lists.freedesktop.org
Reviewed-by: Lyude Paul <lyude@redhat.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/aa45875200705205ae101c409fc2bba03b631a5e.1715353572.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-05-23 14:37:24 +03:00
Douglas Anderson
bd0fc87d5a
dt-bindings: display: Reorganize legacy eDP panel bindings
...
Back in the day, we used to need to list the exact panel in dts for
eDP panels. This led to all sorts of problems including a large number
of cases where people listed a bogus panel in their device tree
because of the needs of second sourcing (and third sourcing, and
fourth sourcing, ...). Back when we needed to add eDP panels to dts
files we used to list them in "panel-simple.yaml".
These days we have the new way of doing things as documented in
"panel-edp.yaml". We can just list the compatible "edp-panel", add
some timing info to the source code, and we're good to go. There's not
really good reasons not to use this new method.
To try to make it obvious that we shouldn't add new compatible strings
for eDP panels, let's move them all out of the old "panel-simple.yaml"
file to their own file: "panel-edp-legacy.yaml". This new file will
have a description that makes it obvious that we shouldn't use it for
new panels.
While we're doing this:
- We can remove eDP-specific properties from panel-simple.yaml since
there are no more panels there.
- We don't need to copy non-eDP properties to the
"panel-edp-legacy.yaml".
- We'll fork off a separate yaml file for "samsung,atna33xc20.yaml".
This is an eDP panel which isn't _quite_ handled by the generic
"edp-panel" compatible since it's not allowed to have an external
backlight (it has one builtin) and it absolutely requires an
"enable" GPIO.
- We'll un-fork the "sharp,ld-d5116z01b.yaml" and put it in
"panel-edp-legacy.yaml" since there doesn't appear to be any reason
for it to be separate.
Suggested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Douglas Anderson <dianders@chromium.org >
Reviewed-by: Rob Herring (Arm) <robh@kernel.org >
Link: https://lore.kernel.org/r/20240520153813.1.Iefaa5b93ca2faada269af77deecdd139261da7ec@changeid
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240520153813.1.Iefaa5b93ca2faada269af77deecdd139261da7ec@changeid
2024-05-23 09:32:56 +02:00
Haikun Zhou
7acacca1b1
drm/panel-edp: Add CMN N116BCJ-EAK
...
Add support for the CMN N116BCJ-EAK, place the raw EDID here for
subsequent reference.
00 ff ff ff ff ff ff 00 0d ae 60 11 00 00 00 00
04 22 01 04 95 1a 0e 78 02 67 75 98 59 53 90 27
1c 50 54 00 00 00 01 01 01 01 01 01 01 01 01 01
01 01 01 01 01 01 da 1d 56 e2 50 00 20 30 30 20
a6 00 00 90 10 00 00 18 00 00 00 fe 00 4e 31 31
36 42 43 4a 2d 45 41 4b 0a 20 00 00 00 fe 00 43
4d 4e 0a 20 20 20 20 20 20 20 20 20 00 00 00 fe
00 4e 31 31 36 42 43 4a 2d 45 41 4b 0a 20 00 98
Signed-off-by: Haikun Zhou <zhouhaikun5@huaqin.corp-partner.google.com >
Reviewed-by: Douglas Anderson <dianders@chromium.org >
Signed-off-by: Douglas Anderson <dianders@chromium.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240522113924.1261683-1-zhouhaikun5@huaqin.corp-partner.google.com
2024-05-22 07:10:32 -07:00
Kuro Chung
484436ec5c
drm/bridge: it6505: fix hibernate to resume no display issue
...
When the system power resumes, the TTL input of IT6505 may experience
some noise before the video signal stabilizes, necessitating a video
reset. This patch is implemented to prevent a loop of video error
interrupts, which can occur when a video reset in the video FIFO error
interrupt triggers another such interrupt. The patch processes the SCDT
and FIFO error interrupts simultaneously and ignores any video FIFO
error interrupts caused by a video reset.
Fixes: b5c84a9edc ("drm/bridge: add it6505 driver")
Signed-off-by: Kuro Chung <kuro.chung@ite.com.tw >
Signed-off-by: Hermes Wu <hermes.wu@ite.com.tw >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Signed-off-by: Robert Foss <rfoss@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240522065528.1053439-1-kuro.chung@ite.com.tw
2024-05-22 11:49:43 +02:00
Ville Syrjälä
a856a53de9
drm/probe-helper: Call drm_mode_validate_ycbcr420() before connector->mode_valid()
...
Make life easier for drivers by filtering out unwanted YCbCr 4:2:0
only modes prior to calling the connector->mode_valid() hook.
Currently drivers will still see YCbCr 4:2:0 only modes in said
hook, which will likely come as a suprise when the driver has
declared no support for such modes (via setting
connector->ycbcr_420_allowed to false).
Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10992
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240516173324.18149-1-ville.syrjala@linux.intel.com
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2024-05-21 21:39:26 +03:00
Wayne Lin
8a0a7b98d4
drm/mst: Fix NULL pointer dereference at drm_dp_add_payload_part2
...
[Why]
Commit:
- commit 5aa1dfcdf0 ("drm/mst: Refactor the flow for payload allocation/removement")
accidently overwrite the commit
- commit 54d217406a ("drm: use mgr->dev in drm_dbg_kms in drm_dp_add_payload_part2")
which cause regression.
[How]
Recover the original NULL fix and remove the unnecessary input parameter 'state' for
drm_dp_add_payload_part2().
Fixes: 5aa1dfcdf0 ("drm/mst: Refactor the flow for payload allocation/removement")
Reported-by: Leon Weiß <leon.weiss@ruhr-uni-bochum.de >
Link: https://lore.kernel.org/r/38c253ea42072cc825dc969ac4e6b9b600371cc8.camel@ruhr-uni-bochum.de/
Cc: lyude@redhat.com
Cc: imre.deak@intel.com
Cc: stable@vger.kernel.org
Cc: regressions@lists.linux.dev
Reviewed-by: Harry Wentland <harry.wentland@amd.com >
Acked-by: Jani Nikula <jani.nikula@intel.com >
Signed-off-by: Wayne Lin <Wayne.Lin@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240307062957.2323620-1-Wayne.Lin@amd.com
2024-05-21 13:06:04 -04:00
Marek Vasut
d9ca4b760e
drm/bridge: tc358767: Enable FRMSYNC timing generator
...
TC9595 datasheet Video Path0 Control (VPCTRL0) Register bit FRMSYNC description
says "This bit should be disabled only in video mode transmission where Host
transmits video timing together with video data and where pixel clock source
is from DSI clock." . This driver always sources pixel clock from external xtal,
therefore the FRMSYNC bit must always be enabled, enable it.
This fixes an actual issue with DSI-to-DPI mode, where the display would
randomly show subtle pixel flickering, or wobble, or shimmering. This is
visible on solid gray color, but the degree of the shimmering differs
between boots, which makes it hard to debug.
There is a caveat to the FRMSYNC and this bridge pixel PLL, which can only
generate pixel clock with limited accuracy, it may therefore be necessary
to reduce the HFP to fit into line length of input pixel data, to avoid any
possible overflows, which make the output video look striped horizontally.
Signed-off-by: Marek Vasut <marex@denx.de >
Reviewed-by: Robert Foss <rfoss@kernel.org >
Signed-off-by: Robert Foss <rfoss@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240513021607.129111-1-marex@denx.de
2024-05-21 14:23:19 +02:00
Douglas Anderson
a2ab7cb169
drm/panel: himax-hx83102: use wrapped MIPI DCS functions
...
Take advantage of some of the new wrapped routines introduced by
commit f79d6d28d8 ("drm/mipi-dsi: wrap more functions for streamline
handling") to simplify the himax-hx83102 driver a bit more. This gets
rid of some extra error prints (since the _multi functions all print
errors for you) and simplifies the code a bit.
One thing here that isn't just refactoring is that in a few places we
now check with errors with "if (err)" instead of "if (err < 0)". All
errors are expected to be negative so this is not expected to have any
impact. The _multi code internally considers anything non-zero to be
an error so this just makes things consistent.
It can also be noted that hx83102_prepare() has a mix of things that
can take advantage of _multi calls and things that can't. The cleanest
seemed to be to use the multi_ctx still but consistently use the
"accum_err" variable for error returns, though that's definitely a
style decision with pros and cons.
Signed-off-by: Douglas Anderson <dianders@chromium.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Linus Walleij <linus.walleij@linaro.org >
Link: https://lore.kernel.org/r/20240517143643.8.If761d37b5d511867ac8207fe8220ae48d444a04f@changeid
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240517143643.8.If761d37b5d511867ac8207fe8220ae48d444a04f@changeid
2024-05-21 10:01:20 +02:00
Douglas Anderson
676a079fb3
drm/panel: himax-hx83102: Check for errors on the NOP in prepare()
...
The mipi_dsi_dcs_nop() function returns an error but we weren't
checking it in hx83102_prepare(). Add a check. This is highly unlikely
to matter in practice. If the NOP failed then likely later MIPI
commands would fail too.
Found by code inspection.
Fixes: 0ef94554dc ("drm/panel: himax-hx83102: Break out as separate driver")
Signed-off-by: Douglas Anderson <dianders@chromium.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Linus Walleij <linus.walleij@linaro.org >
Link: https://lore.kernel.org/r/20240517143643.7.I3fae28745bf2cacd8dac04d7a06daea50e233f46@changeid
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240517143643.7.I3fae28745bf2cacd8dac04d7a06daea50e233f46@changeid
2024-05-21 10:01:20 +02:00
Douglas Anderson
509eaa8aee
drm/panel: himax-hx83102: If prepare fails, disable GPIO before regulators
...
The enable GPIO should clearly be set low before turning off
regulators. That matches both the inverse order that things were
enabled and also the order in unprepare().
Fixes: 0ef94554dc ("drm/panel: himax-hx83102: Break out as separate driver")
Signed-off-by: Douglas Anderson <dianders@chromium.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Linus Walleij <linus.walleij@linaro.org >
Link: https://lore.kernel.org/r/20240517143643.6.Id0659a80147cf51e0ebb8fe7fee18db86851960d@changeid
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240517143643.6.Id0659a80147cf51e0ebb8fe7fee18db86851960d@changeid
2024-05-21 10:01:20 +02:00
Douglas Anderson
6a7bd6cde7
drm/panel: ilitek-ili9882t: Check for errors on the NOP in prepare()
...
The mipi_dsi_dcs_nop() function returns an error but we weren't
checking it in ili9882t_prepare(). Add a check. This is highly
unlikely to matter in practice. If the NOP failed then likely later
MIPI commands would fail too.
Found by code inspection.
Fixes: e2450d32e5 ("drm/panel: ili9882t: Break out as separate driver")
Signed-off-by: Douglas Anderson <dianders@chromium.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Linus Walleij <linus.walleij@linaro.org >
Link: https://lore.kernel.org/r/20240517143643.5.I323476ba9fa8cc7a5adee4c1ec95202785cc5686@changeid
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240517143643.5.I323476ba9fa8cc7a5adee4c1ec95202785cc5686@changeid
2024-05-21 10:01:20 +02:00
Douglas Anderson
554c001819
drm/panel: ilitek-ili9882t: If prepare fails, disable GPIO before regulators
...
The enable GPIO should clearly be set low before turning off
regulators. That matches both the inverse order that things were
enabled and also the order in unprepare().
Fixes: e2450d32e5 ("drm/panel: ili9882t: Break out as separate driver")
Signed-off-by: Douglas Anderson <dianders@chromium.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Linus Walleij <linus.walleij@linaro.org >
Link: https://lore.kernel.org/r/20240517143643.4.Ieb0179065847972a0f13e9a8574a80a5f65f3338@changeid
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240517143643.4.Ieb0179065847972a0f13e9a8574a80a5f65f3338@changeid
2024-05-21 10:01:20 +02:00
Douglas Anderson
6320b9199d
drm/panel: boe-tv101wum-nl6: Check for errors on the NOP in prepare()
...
The mipi_dsi_dcs_nop() function returns an error but we weren't
checking it in boe_panel_prepare(). Add a check. This is highly
unlikely to matter in practice. If the NOP failed then likely later
MIPI commands would fail too.
Found by code inspection.
Fixes: 812562b8d8 ("drm/panel: boe-tv101wum-nl6: Fine tune the panel power sequence")
Signed-off-by: Douglas Anderson <dianders@chromium.org >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Linus Walleij <linus.walleij@linaro.org >
Link: https://lore.kernel.org/r/20240517143643.3.Ibffbaa5b4999ac0e55f43bf353144433b099d727@changeid
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240517143643.3.Ibffbaa5b4999ac0e55f43bf353144433b099d727@changeid
2024-05-21 10:01:20 +02:00
Douglas Anderson
587c48f622
drm/panel: boe-tv101wum-nl6: If prepare fails, disable GPIO before regulators
...
The enable GPIO should clearly be set low before turning off
regulators. That matches both the inverse order that things were
enabled and also the order in unprepare().
Fixes: a869b9db7a ("drm/panel: support for boe tv101wum-nl6 wuxga dsi video mode panel")
Signed-off-by: Douglas Anderson <dianders@chromium.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Linus Walleij <linus.walleij@linaro.org >
Link: https://lore.kernel.org/r/20240517143643.2.Ieac346cd0f1606948ba39ceea06b55359fe972b6@changeid
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240517143643.2.Ieac346cd0f1606948ba39ceea06b55359fe972b6@changeid
2024-05-21 10:01:20 +02:00
Douglas Anderson
cc2db2ef8d
drm/panel: himax-hx8394: Handle errors from mipi_dsi_dcs_set_display_on() better
...
If mipi_dsi_dcs_set_display_on() returned an error then we'd store
that in the "ret" variable and jump to error handling. We'd then
attempt an orderly poweroff. Unfortunately we then blew away the value
stored in "ret". That means that if the orderly poweroff actually
worked then we're return 0 (no error) from hx8394_enable() even though
the panel wasn't enabled.
Fix this by not blowing away "ret".
Found by code inspection.
Fixes: 65dc9360f7 ("drm: panel: Add Himax HX8394 panel controller driver")
Signed-off-by: Douglas Anderson <dianders@chromium.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Linus Walleij <linus.walleij@linaro.org >
Link: https://lore.kernel.org/r/20240517143643.1.I0a6836fffd8d7620f353becb3df2370d2898f803@changeid
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240517143643.1.I0a6836fffd8d7620f353becb3df2370d2898f803@changeid
2024-05-21 10:01:19 +02:00
Jocelyn Falempe
b593ea9406
drm/mgag200: Add an option to disable Write-Combine
...
Unfortunately, the G200 ioburst workaround doesn't work on some
servers like Dell poweredge XR11, XR5610, or HPE XL260. In this case
completely disabling WC is the only option to achieve low-latency.
So this adds a new Kconfig option to disable WC mapping of the G200.
Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com >
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de >
Link: https://patchwork.freedesktop.org/patch/msgid/20240517151050.624797-3-jfalempe@redhat.com
2024-05-21 09:38:47 +02:00
Jocelyn Falempe
e7f67d0388
Revert "drm/mgag200: Add a workaround for low-latency"
...
This reverts commit bfa4437fd3 .
This workaround doesn't work reliably on all servers.
I'll replace it with an option to disable Write-Combine,
which has more impact on performance, but fix the latency
issue on all hardware.
Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com >
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de >
Link: https://patchwork.freedesktop.org/patch/msgid/20240517151050.624797-2-jfalempe@redhat.com
2024-05-21 09:38:46 +02:00
Maíra Canal
673087d8b0
drm/v3d: Deprecate the use of the Performance Counters enum
...
The Performance Counters enum used to identify the index of each
performance counter and provide the total number of performance
counters (V3D_PERFCNT_NUM). But, this enum is only valid for V3D 4.2,
not for V3D 7.1.
As we implemented a new flexible structure to retrieve performance
counters information, we can deprecate this enum.
Signed-off-by: Maíra Canal <mcanal@igalia.com >
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240512222655.2792754-7-mcanal@igalia.com
2024-05-20 16:38:04 -03:00
Maíra Canal
f5b798bdc9
drm/v3d: Use V3D_MAX_COUNTERS instead of V3D_PERFCNT_NUM
...
V3D_PERFCNT_NUM represents the maximum number of performance counters
for V3D 4.2, but not for V3D 7.1. This means that, if we use
V3D_PERFCNT_NUM, we might go out-of-bounds on V3D 7.1.
Therefore, use the number of performance counters on V3D 7.1 as the
maximum number of counters. This will allow us to create arrays on the
stack with reasonable size. Note that userspace must use the value
provided by DRM_V3D_PARAM_MAX_PERF_COUNTERS.
Signed-off-by: Maíra Canal <mcanal@igalia.com >
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240512222655.2792754-6-mcanal@igalia.com
2024-05-20 16:38:03 -03:00
Maíra Canal
f33fe58298
drm/v3d: Create new IOCTL to expose performance counters information
...
Userspace usually needs some information about the performance counters
available. Although we could replicate this information in the kernel
and user-space, let's use the kernel as the "single source of truth" to
avoid issues in the future (e.g. list of performance counters is updated
in user-space, but not in the kernel, generating invalid requests).
Therefore, create a new IOCTL to expose the performance counters
information, that is name, category, and description.
Signed-off-by: Maíra Canal <mcanal@igalia.com >
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240512222655.2792754-5-mcanal@igalia.com
2024-05-20 16:38:02 -03:00
Maíra Canal
36b75080e6
drm/v3d: Create a new V3D parameter for the maximum number of perfcnt
...
The maximum number of performance counters can change from version to
version and it's important for userspace to know this value, as it needs
to use the counters for performance queries. Therefore, expose the
maximum number of performance counters to userspace as a parameter.
Signed-off-by: Maíra Canal <mcanal@igalia.com >
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240512222655.2792754-4-mcanal@igalia.com
2024-05-20 16:38:01 -03:00
Maíra Canal
c606043ddb
drm/v3d: Different V3D versions can have different number of perfcnt
...
Currently, even though V3D 7.1 has 93 performance counters, it is not
possible to create counters bigger than 87, as
`v3d_perfmon_create_ioctl()` understands that counters bigger than 87
are invalid.
Therefore, create a device variable to expose the maximum
number of counters for a given V3D version and make
`v3d_perfmon_create_ioctl()` check this variable.
This commit fixes CTS failures in the performance queries tests
`dEQP-VK.query_pool.performance_query.*` [1]
Link: ea1f09a5f2 [1]
Fixes: 6fd9487147 ("drm/v3d: add brcm,2712-v3d as a compatible V3D device")
Signed-off-by: Maíra Canal <mcanal@igalia.com >
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240512222655.2792754-3-mcanal@igalia.com
2024-05-20 16:38:00 -03:00
Maíra Canal
3cbcbe016c
drm/v3d: Add Performance Counters descriptions for V3D 4.2 and 7.1
...
Add name, category and description for each one of the 93 performance
counters available on V3D.
Note that V3D 4.2 has 87 performance counters, while V3D 7.1 has 93.
Therefore, there are two performance counters arrays. The index of the
performance counter for each V3D version is represented by its position
on the array.
Signed-off-by: Maíra Canal <mcanal@igalia.com >
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240512222655.2792754-2-mcanal@igalia.com
2024-05-20 16:37:59 -03:00
Dmitry Baryshkov
85cb9d6039
drm/panel: lg-sw43408: use new streamlined MIPI DSI API
...
Use newer mipi_dsi_*_multi() functions in order to simplify and cleanup
panel's prepare() and unprepare() functions.
Reviewed-by: Douglas Anderson <dianders@chromium.org >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20240512-dsi-panels-upd-api-v2-7-e31ca14d102e@linaro.org
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240512-dsi-panels-upd-api-v2-7-e31ca14d102e@linaro.org
2024-05-17 21:36:21 +02:00
Dmitry Baryshkov
67ba7a82d9
drm/panel: novatek-nt36672e: use wrapped MIPI DCS functions
...
Remove conditional code and always use mipi_dsi_dcs_*multi() wrappers to
simplify driver's init/exit code. This also includes passing context to
the init_sequence() function instead of passing the DSI device.
Reviewed-by: Douglas Anderson <dianders@chromium.org >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20240512-dsi-panels-upd-api-v2-6-e31ca14d102e@linaro.org
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240512-dsi-panels-upd-api-v2-6-e31ca14d102e@linaro.org
2024-05-17 21:36:21 +02:00
Dmitry Baryshkov
0f43988fb9
drm/panel: innolux-p079zca: use mipi_dsi_dcs_nop_multi()
...
Remove conditional code and use mipi_dsi_dcs_nop_multi() wrapper to
simplify driver code.
Reviewed-by: Douglas Anderson <dianders@chromium.org >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20240512-dsi-panels-upd-api-v2-5-e31ca14d102e@linaro.org
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240512-dsi-panels-upd-api-v2-5-e31ca14d102e@linaro.org
2024-05-17 21:36:20 +02:00
Dmitry Baryshkov
510ba36e86
drm/panel: ilitek-ili9882t: use wrapped MIPI DCS functions
...
Remove conditional code and always use mipi_dsi_dcs_*multi() wrappers to
simplify driver's init/exit code.
Reviewed-by: Douglas Anderson <dianders@chromium.org >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20240512-dsi-panels-upd-api-v2-4-e31ca14d102e@linaro.org
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240512-dsi-panels-upd-api-v2-4-e31ca14d102e@linaro.org
2024-05-17 21:36:20 +02:00
Dmitry Baryshkov
91329f9212
drm/panel: boe-tv101wum-nl6: use wrapped MIPI DCS functions
...
Remove conditional code and always use mipi_dsi_dcs_*multi() wrappers to
simplify driver's init/exit code.
Reviewed-by: Douglas Anderson <dianders@chromium.org >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20240512-dsi-panels-upd-api-v2-3-e31ca14d102e@linaro.org
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240512-dsi-panels-upd-api-v2-3-e31ca14d102e@linaro.org
2024-05-17 21:36:19 +02:00
Dmitry Baryshkov
f79d6d28d8
drm/mipi-dsi: wrap more functions for streamline handling
...
Follow the pattern of mipi_dsi_dcs_*_multi() and wrap several existing
MIPI DSI functions to use the context for processing. This simplifies
and streamlines driver code to use simpler code pattern.
Note, msleep function is also wrapped in this way as it is frequently
called inbetween other mipi_dsi_dcs_*() functions.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Douglas Anderson <dianders@chromium.org >
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://lore.kernel.org/r/20240512-dsi-panels-upd-api-v2-2-e31ca14d102e@linaro.org
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240512-dsi-panels-upd-api-v2-2-e31ca14d102e@linaro.org
2024-05-17 21:36:19 +02:00
Dmitry Baryshkov
51f9183e4a
drm/panel: lg-sw43408: add missing error handling
...
Add missing error handling for the mipi_dsi_ functions that actually
return error code instead of silently ignoring it.
Fixes: 069a6c0e94 ("drm: panel: Add LG sw43408 panel driver")
Reviewed-by: Douglas Anderson <dianders@chromium.org >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20240512-dsi-panels-upd-api-v2-1-e31ca14d102e@linaro.org
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240512-dsi-panels-upd-api-v2-1-e31ca14d102e@linaro.org
2024-05-17 21:36:18 +02:00
Thomas Zimmermann
46c1319860
drm/mgag200: Use drm_connector_helper_get_modes()
...
Mgag200's .get_modes() function is identical to the common helper.
Use the latter.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240513125620.6337-11-tzimmermann@suse.de
2024-05-17 17:20:26 +02:00
Thomas Zimmermann
66d58ec0bc
drm/mgag200: Acquire I/O-register lock in DDC code
...
The modeset lock protects the DDC code from concurrent modeset
operations, which use the same registers. Move that code from the
connector helpers into the DDC helpers .pre_xfer() and .post_xfer().
Both, .pre_xfer() and .post_xfer(), enclose the transfer of data blocks
over the I2C channel in the internal I2C function bit_xfer(). Both
calls are executed unconditionally if present. Invoking DDC transfers
from any where within the driver now takes the lock.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240513125620.6337-10-tzimmermann@suse.de
2024-05-17 17:20:23 +02:00
Thomas Zimmermann
b7e04af37e
drm/mgag200: Rename struct i2c_algo_bit_data callbacks
...
Align the names of the algo-bit helpers with mgag200's convention of
using an mgag200 prefix plus the struct's name plus the callback's name
for such function symbols.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240513125620.6337-9-tzimmermann@suse.de
2024-05-17 17:20:20 +02:00
Thomas Zimmermann
ddadc87f14
drm/mgag200: Rename mgag200_i2c.c to mgag200_ddc.c
...
Rename the source file according to its content. No functional
changes.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240513125620.6337-8-tzimmermann@suse.de
2024-05-17 17:20:17 +02:00
Thomas Zimmermann
814ebf50bb
drm/mgag200: Replace struct mga_i2c_chan with struct mgag200_ddc
...
Rename struct mga_i2c_chan to struct mgag200_ddc, define it in the
source file mgag200_i2c.c, and reorder its fields. Rename all related
variables from i2c to ddc. Also rename the i2c adapter accordingly.
Using the term 'ddc' documents the purpose of the code clearly. The
old term 'i2c' could refer to any functionality on an i2c bus. No
functional changes.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240513125620.6337-7-tzimmermann@suse.de
2024-05-17 17:20:14 +02:00
Thomas Zimmermann
21cd078519
drm/mgag200: Inline mgag200_i2c_init()
...
The function mgag200_i2c_init() is an internal helper that sets
up the i2c data structure. Inline its code into the only caller.
Rearrange the individual steps to separate among i2c algorithm,
adapter and fields in struct mga_i2c_chan.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240513125620.6337-6-tzimmermann@suse.de
2024-05-17 17:20:11 +02:00
Thomas Zimmermann
f2e9952449
drm/mgag200: Allocate instance of struct mga_i2c_chan dynamically
...
Allocate instances of struct mga_i2c_chan in mgag200_ddc_create()
and return a pointer to the contained i2c adapter. The callers of
the function are now independent from struct mga_i2c_chan.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240513125620.6337-5-tzimmermann@suse.de
2024-05-17 17:20:08 +02:00
Thomas Zimmermann
23368d7b9c
drm/mgag200: Store pointer to struct mga_device in struct mga_i2c_chan
...
Avoid upcasting to struct mga_device in i2c code by storing the
pointer directly. No functional changes.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240513125620.6337-4-tzimmermann@suse.de
2024-05-17 17:20:05 +02:00
Thomas Zimmermann
eb1ae34e48
drm/mgag200: Bind I2C lifetime to DRM device
...
Managed cleanup with devm_add_action_or_reset() will release the I2C
adapter when the underlying Linux device goes away. But the connector
still refers to it, so this cleanup leaves behind a stale pointer
in struct drm_connector.ddc.
Bind the lifetime of the I2C adapter to the connector's lifetime by
using DRM's managed release. When the DRM device goes away (after
the Linux device) DRM will first clean up the connector and then
clean up the I2C adapter.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com >
Fixes: b279df2429 ("drm/mgag200: Switch I2C code to managed cleanup")
Cc: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Jocelyn Falempe <jfalempe@redhat.com >
Cc: Dave Airlie <airlied@redhat.com >
Cc: dri-devel@lists.freedesktop.org
Cc: <stable@vger.kernel.org > # v6.0+
Link: https://patchwork.freedesktop.org/patch/msgid/20240513125620.6337-3-tzimmermann@suse.de
2024-05-17 17:20:01 +02:00
Thomas Zimmermann
ecde5db159
drm/mgag200: Set DDC timeout in milliseconds
...
Compute the i2c timeout in jiffies from a value in milliseconds. The
original values of 2 jiffies equals 2 milliseconds if HZ has been
configured to a value of 1000. This corresponds to 2.2 milliseconds
used by most other DRM drivers. Update mgag200 accordingly.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com >
Fixes: 414c453106 ("mgag200: initial g200se driver (v2)")
Cc: Dave Airlie <airlied@redhat.com >
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Cc: Maxime Ripard <mripard@kernel.org >
Cc: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Jocelyn Falempe <jfalempe@redhat.com >
Cc: dri-devel@lists.freedesktop.org
Cc: <stable@vger.kernel.org > # v3.5+
Link: https://patchwork.freedesktop.org/patch/msgid/20240513125620.6337-2-tzimmermann@suse.de
2024-05-17 17:19:50 +02:00
Cong Yang
3179338750
drm/panel: himax-hx83102: Support for IVO t109nw41 MIPI-DSI panel
...
The IVO t109nw41 is a 11.0" WUXGA TFT LCD panel, use hx83102 controller
which fits in nicely with the existing panel-himax-hx83102 driver. Hence,
we add a new compatible with panel specific config.
Signed-off-by: Cong Yang <yangcong5@huaqin.corp-partner.google.com >
Reviewed-by: Douglas Anderson <dianders@chromium.org >
Reviewed-by: Linus Walleij <linus.walleij@linaro.org >
Link: https://lore.kernel.org/r/20240516072039.1287065-7-yangcong5@huaqin.corp-partner.google.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240516072039.1287065-7-yangcong5@huaqin.corp-partner.google.com
2024-05-17 09:25:50 +02:00
Cong Yang
4020c15c0f
dt-bindings: display: panel: Add compatible for IVO t109nw41
...
The IVO t109nw41 is a 11.0" WUXGA TFT LCD panel with himax-hx83102
controller. Hence, we add a new compatible with panel specific config.
Signed-off-by: Cong Yang <yangcong5@huaqin.corp-partner.google.com >
Acked-by: Conor Dooley <conor.dooley@microchip.com >
Link: https://lore.kernel.org/r/20240516072039.1287065-6-yangcong5@huaqin.corp-partner.google.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240516072039.1287065-6-yangcong5@huaqin.corp-partner.google.com
2024-05-17 09:25:49 +02:00
Cong Yang
1173db1176
drm/panel: himax-hx83102: Support for BOE nv110wum-l60 MIPI-DSI panel
...
The BOE nv110wum-l60 is a 11.0" WUXGA TFT LCD panel, use hx83102 controller
which fits in nicely with the existing panel-himax-hx83102 driver. Hence,
we add a new compatible with panel specific config.
Signed-off-by: Cong Yang <yangcong5@huaqin.corp-partner.google.com >
Reviewed-by: Douglas Anderson <dianders@chromium.org >
Reviewed-by: Linus Walleij <linus.walleij@linaro.org >
Link: https://lore.kernel.org/r/20240516072039.1287065-5-yangcong5@huaqin.corp-partner.google.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240516072039.1287065-5-yangcong5@huaqin.corp-partner.google.com
2024-05-17 09:25:49 +02:00
Cong Yang
4fd07f679b
dt-bindings: display: panel: Add compatible for BOE nv110wum-l60
...
The BOE nv110wum-l60 is a 11.0" WUXGA TFT LCD panel with himax-hx83102
controller. Hence, we add a new compatible with panel specific config.
Signed-off-by: Cong Yang <yangcong5@huaqin.corp-partner.google.com >
Acked-by: Conor Dooley <conor.dooley@microchip.com >
Link: https://lore.kernel.org/r/20240516072039.1287065-4-yangcong5@huaqin.corp-partner.google.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240516072039.1287065-4-yangcong5@huaqin.corp-partner.google.com
2024-05-17 09:25:48 +02:00
Cong Yang
0ef94554dc
drm/panel: himax-hx83102: Break out as separate driver
...
The Starry HX83102 based mipi panel should never have been part of the boe
tv101wum-n16 driver. Discussion with Doug and Linus in V1 [1], we need a
separate driver to enable the hx83102 controller.
In hx83102 driver, add DSI commands as macros. So it can add some panels
with same control model in the future.
In the old boe-tv101wum-nl6 driver inital cmds was invoked at the end of
prepare() function , and call 0x11 and 0x29 at end of inital. For
himax-hx83102 driver, we move 0x11 and 0x29 cmds invoked at prepare()
function.
Note:0x11 is mipi_dsi_dcs_exit_sleep_mode
0x29 is mipi_dsi_dcs_set_display_on
[1]: https://lore.kernel.org/all/CACRpkdbzYZAS0=zBQJUC4CB2wj4s1h6n6aSAZQvdMV95r3zRUw@mail.gmail.com
Signed-off-by: Cong Yang <yangcong5@huaqin.corp-partner.google.com >
Reviewed-by: Douglas Anderson <dianders@chromium.org >
Reviewed-by: Linus Walleij <linus.walleij@linaro.org >
Link: https://lore.kernel.org/r/20240516072039.1287065-3-yangcong5@huaqin.corp-partner.google.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240516072039.1287065-3-yangcong5@huaqin.corp-partner.google.com
2024-05-17 09:25:47 +02:00
Cong Yang
eba54e9c44
dt-bindings: display: panel: Add himax hx83102 panel bindings
...
In V1, discussed with Doug and Linus [1], we need break out as separate
driver for the himax83102-j02 controller. Beacuse "starry,himax83102-j02"
and in this series "BOE nv110wum-l60" "IVO t109nw41" panels use same
controller, they have some common CMDS. So add new documentation for
this panels.
For himax83102-j02 controller, no need 3v3 supply, so remove it.
[1]: https://lore.kernel.org/all/CACRpkdbzYZAS0=zBQJUC4CB2wj4s1h6n6aSAZQvdMV95r3zRUw@mail.gmail.com
Signed-off-by: Cong Yang <yangcong5@huaqin.corp-partner.google.com >
Reviewed-by: Conor Dooley <conor.dooley@microchip.com >
Link: https://lore.kernel.org/r/20240516072039.1287065-2-yangcong5@huaqin.corp-partner.google.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240516072039.1287065-2-yangcong5@huaqin.corp-partner.google.com
2024-05-17 09:25:46 +02:00
Jacek Lawrynowicz
2f7ffb06d6
accel/ivpu: Replace wake_thread with kfifo
...
Use kfifo to pass IRQ sources to IRQ thread so it will be possible to
use IRQ thread by multiple IRQ types.
Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com >
Reviewed-by: Wachowski, Karol <karol.wachowski@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240515113006.457472-4-jacek.lawrynowicz@linux.intel.com
2024-05-17 08:30:27 +02:00
Wachowski, Karol
8a27ad81f7
accel/ivpu: Split IP and buttress code
...
The NPU device consists of two parts: NPU buttress and NPU IP.
Buttress is a platform specific part that integrates the NPU IP with
the CPU.
NPU IP is the platform agnostic part that does the inference.
This separation enables support for multiple platforms using
a single NPU IP, so for example NPU IP 37XX could be integrated into
MTL and LNL platforms.
Signed-off-by: Wachowski, Karol <karol.wachowski@intel.com >
Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240515113006.457472-3-jacek.lawrynowicz@linux.intel.com
2024-05-17 08:30:24 +02:00
Wachowski, Karol
302d583211
accel/ivpu: Split IP and buttress headers
...
Move buttress registers to ivpu_hw_btrs_*_reg.h headers.
This is an intermediate step before HW layer refactor.
Signed-off-by: Wachowski, Karol <karol.wachowski@intel.com >
Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240515113006.457472-2-jacek.lawrynowicz@linux.intel.com
2024-05-17 08:30:23 +02:00