Il 24/07/23 19:58, Justin Green ha scritto:
Add a check to mtk_drm_mode_fb_create() that rejects any modifier that
is not the AFBC mode supported by MT8195's display overlays.
Tested by booting ChromeOS and verifying the UI works, and by running
the ChromeOS kms_addfb_basic binary, which has a
fence signal status in order to prevent
spurious job timeouts due to a slow IRQ processing.
Signed-off-by: Dmitry Osipenko
Reviewed-by: AngeloGioacchino Del Regno
Also, on MediaTek MT8192 and MT8195 Chromebooks:
Tested-by: AngeloGioacchino Del Regno
Il 20/07/23 14:29, Alexandre Mergnat ha scritto:
On 20/07/2023 14:08, AngeloGioacchino Del Regno wrote:
Il 20/07/23 14:07, Alexandre Mergnat ha scritto:
On 20/07/2023 13:54, AngeloGioacchino Del Regno wrote:
Il 20/07/23 12:14, Alexandre Mergnat ha scritto:
On 20/07/2023 10:26, Shuijing
Il 20/07/23 14:07, Alexandre Mergnat ha scritto:
On 20/07/2023 13:54, AngeloGioacchino Del Regno wrote:
Il 20/07/23 12:14, Alexandre Mergnat ha scritto:
On 20/07/2023 10:26, Shuijing Li wrote:
Due to the difference of HW, different dividers need to be set.
Signed-off-by: Shuijing Li
Il 20/07/23 12:14, Alexandre Mergnat ha scritto:
On 20/07/2023 10:26, Shuijing Li wrote:
Due to the difference of HW, different dividers need to be set.
Signed-off-by: Shuijing Li
Signed-off-by: Jitao Shi
---
Changes in v3:
Separate these two things into two different patches.
per
Il 20/07/23 10:26, Shuijing Li ha scritto:
Due to the difference of HW, different dividers need to be set.
Signed-off-by: Shuijing Li
Signed-off-by: Jitao Shi
Reviewed-by: AngeloGioacchino Del Regno
Reviewed-by: AngeloGioacchino Del Regno
Il 19/07/23 23:54, Marijn Suijten ha scritto:
On 2023-07-19 01:02:56, Dmitry Baryshkov wrote:
On 19/07/2023 00:24, Marijn Suijten wrote:
This node has always resided in the wrong spot, making it somewhat
harder to contribute new node entries while maintaining proper sorting
around it. Move
Use dev_err_probe() across the entire probe function of this driver
to shrink the size.
Signed-off-by: AngeloGioacchino Del Regno
Reviewed-by: Fei Shao
---
drivers/gpu/drm/mediatek/mtk_dpi.c | 44 ++
1 file changed, 14 insertions(+), 30 deletions(-)
diff --git
Instead of the open-coded platform_get_resource, devm_ioremap_resource
switch to devm_platform_ioremap_resource(), also dropping the useless
struct resource pointer, which becomes unused.
Signed-off-by: AngeloGioacchino Del Regno
---
drivers/gpu/drm/mediatek/mtk_dpi.c | 4 +---
1 file changed
Function drm_of_find_panel_or_bridge() is marked as deprecated: since
the usage of that in this driver exactly corresponds to the new function
devm_drm_of_get_bridge(), switch to it.
Signed-off-by: AngeloGioacchino Del Regno
Reviewed-by: Fei Shao
---
drivers/gpu/drm/mediatek/mtk_dpi.c | 10
Change drm_bridge_add() to its devm variant to slightly simplify the
probe function.
Signed-off-by: AngeloGioacchino Del Regno
---
drivers/gpu/drm/mediatek/mtk_dpi.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c
b/drivers/gpu/drm
The .remove() callback cannot fail: switch to .remove_new() and
change mtk_dpi_remove() to void.
Signed-off-by: AngeloGioacchino Del Regno
---
drivers/gpu/drm/mediatek/mtk_dpi.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c
b
Reduce line count by compressing the entries of struct of_device_id;
while at it, also add the usual /* sentinel */ comment to the last
entry.
This commit brings no functional changes.
Signed-off-by: AngeloGioacchino Del Regno
---
drivers/gpu/drm/mediatek/mtk_dpi.c | 30
of_device_id entries
- Added a commit to switch to .remove_new() callback
This is a small cleanup of the mtk-dpi driver, switching it to devm
variants where possible and where it made sense, and reducing lines
while retaining and improving human readability.
AngeloGioacchino Del Regno (6):
drm
Il 23/06/23 14:49, Alexandre Mergnat ha scritto:
On 23/06/2023 11:49, AngeloGioacchino Del Regno wrote:
This series changes MediaTek CMDQ support to use the mtk-cmdq-helper
functions, removing duplicated cmdq setup code in mtk-drm and also
removing all instances of `#if IS_REACHABLE
Il 23/06/23 13:29, Alexandre Mergnat ha scritto:
On 23/06/2023 11:47, AngeloGioacchino Del Regno wrote:
Il 23/05/23 12:42, AngeloGioacchino Del Regno ha scritto:
Due to the initial confusion about MIPI_DSI_MODE_EOT_PACKET, properly
renamed to MIPI_DSI_MODE_NO_EOT_PACKET, reflecting its
in
mtk_dp_update_plugged_status(): if not, we simply return immediately.
While at it, since the update_plugged_status_lock mutex would not be
used if the controller doesn't support audio at all, initialize it
only if `audio_supported` is true.
Signed-off-by: AngeloGioacchino Del Regno
---
drivers/gpu/drm
In preparation for adding support for eDP, move the PHY registration
code to a new mtk_dp_register_phy() function for better readability.
This commit brings no functional changes.
Signed-off-by: AngeloGioacchino Del Regno
---
drivers/gpu/drm/mediatek/mtk_dp.c | 43
-by: AngeloGioacchino Del Regno
---
drivers/gpu/drm/mediatek/mtk_dp.c | 45 ++-
1 file changed, 38 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/mediatek/mtk_dp.c
b/drivers/gpu/drm/mediatek/mtk_dp.c
index acdd457b5449..e74295ba9707 100644
--- a/drivers
arated aux-bus, it was necessary to add an exclusion for the
cable_plugged_in check in `mtk_dp_aux_transfer()` and the easiest
way to do this is to simply ignore checking that when the bridge
type is eDP.
Signed-off-by: AngeloGioacchino Del Regno
---
drivers/gpu/drm/mediatek/Kconfig | 1 +
drive
and manage the enablement of the ISR in the .attach()
and .detach() handlers for the DP bridge.
Signed-off-by: AngeloGioacchino Del Regno
Tested-by: Chen-Yu Tsai
---
drivers/gpu/drm/mediatek/mtk_dp.c | 15 ++-
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm
altogether and rely on HPD polling only
for the suspend/resume case, saving us some spinlocking action and
the overhead of interrupts firing at every suspend/resume cycle,
achieving a faster (even if just slightly) display resume.
Signed-off-by: AngeloGioacchino Del Regno
---
drivers/gpu/drm
Move the register write to MTK_DP_AUX_P0_3690 to set the AUX reply mode
to function mtk_dp_initialize_aux_settings(), as this is effectively
part of the DPTX AUX setup sequence.
Signed-off-by: AngeloGioacchino Del Regno
Tested-by: Chen-Yu Tsai
---
drivers/gpu/drm/mediatek/mtk_dp.c | 9
potentially start happening in a later commit implementing
aux-bus support, as AUX transfers will be triggered from the panel
driver (for EDID) before the mtk-dp bridge gets attached, and it's
done in preparation for the same.
Signed-off-by: AngeloGioacchino Del Regno
Tested-by: Chen-Yu Tsai
iatek: Add MT8195 Embedded DisplayPort driver")
Signed-off-by: AngeloGioacchino Del Regno
---
drivers/gpu/drm/mediatek/mtk_dp.c | 15 ++-
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/mediatek/mtk_dp.c
b/drivers/gpu/drm/mediatek/mtk_dp.c
index 64
or not, it takes the same time
and anyway the DP hardware won't produce any error (or, if it
does, it's ignorable because it won't block further commands)
- Second, training the link between a sleeping/standby/unpowered
display makes little sense.
Signed-off-by: AngeloGioacchino Del Regno
In preparation for adding support for aux-bus, which will add a code
path that may fail after the drm_bridge_add() call, change that to
devm_drm_bridge_add() to simplify failure paths later.
Signed-off-by: AngeloGioacchino Del Regno
Tested-by: Chen-Yu Tsai
---
drivers/gpu/drm/mediatek
backlight = <_lcd0>;
port {
panel_in: endpoint {
remote-endpoint = <_out>;
};
};
};
};
};
AngeloG
variable directly.
Fixes: 1a64a7aff8da ("drm/mediatek: Fix cursor plane no update")
Signed-off-by: Jason-JH.Lin
Reviewed-by: Alexandre Mergnat
Reviewed-by: AngeloGioacchino Del Regno
Il 13/07/23 09:55, Fei Shao ha scritto:
Hi Angelo,
On Wed, Apr 12, 2023 at 7:53 PM AngeloGioacchino Del Regno
wrote:
Change drm_bridge_add() to its devm variant to slightly simplify the
probe function.
Signed-off-by: AngeloGioacchino Del Regno
---
drivers/gpu/drm/mediatek/mtk_dpi.c | 5
Il 13/07/23 10:34, Fei Shao ha scritto:
Hi Angelo,
On Wed, Apr 12, 2023 at 7:53 PM AngeloGioacchino Del Regno
wrote:
Instead of the open-coded platform_get_resource, devm_ioremap_resource
switch to devm_platform_get_and_ioremap_resource(), doing exactly the
same.
Signed-off
Il 13/07/23 10:24, Fei Shao ha scritto:
Hi Angelo,
On Wed, Apr 12, 2023 at 7:53 PM AngeloGioacchino Del Regno
wrote:
Function drm_of_find_panel_or_bridge() is marked as deprecated: since
the usage of that in this driver exactly corresponds to the new function
devm_drm_of_get_bridge(), switch
Il 13/07/23 11:54, Chen-Yu Tsai ha scritto:
On Thu, Jul 13, 2023 at 5:01 PM AngeloGioacchino Del Regno
wrote:
Changes in v5:
- Added .wait_hpd_asserted() callback for aux-bus
- Avoid enabling and registering HPD interrupt + handlers for
eDP case only (keeps HPD interrupts enabled
In preparation for adding support for aux-bus, which will add a code
path that may fail after the drm_bridge_add() call, change that to
devm_drm_bridge_add() to simplify failure paths later.
Signed-off-by: AngeloGioacchino Del Regno
Tested-by: Chen-Yu Tsai
---
drivers/gpu/drm/mediatek
of
this driver, assign the DRM_BRIDGE_OP_{DETECT, EDID, HPD} ops only
if we're probing full DisplayPort and not eDP.
Signed-off-by: AngeloGioacchino Del Regno
---
drivers/gpu/drm/mediatek/mtk_dp.c | 31 ---
1 file changed, 28 insertions(+), 3 deletions(-)
diff --git a/drivers
arated aux-bus, it was necessary to add an exclusion for the
cable_plugged_in check in `mtk_dp_aux_transfer()` and the easiest
way to do this is to simply ignore checking that when the bridge
type is eDP.
Signed-off-by: AngeloGioacchino Del Regno
---
drivers/gpu/drm/mediatek/Kconfig | 1 +
drive
and manage the enablement of the ISR in the .attach()
and .detach() handlers for the DP bridge.
Signed-off-by: AngeloGioacchino Del Regno
Tested-by: Chen-Yu Tsai
---
drivers/gpu/drm/mediatek/mtk_dp.c | 15 ++-
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm
In preparation for adding support for eDP, move the PHY registration
code to a new mtk_dp_register_phy() function for better readability.
This commit brings no functional changes.
Signed-off-by: AngeloGioacchino Del Regno
---
drivers/gpu/drm/mediatek/mtk_dp.c | 43
altogether and rely on HPD polling only
for the suspend/resume case, saving us some spinlocking action and
the overhead of interrupts firing at every suspend/resume cycle,
achieving a faster (even if just slightly) display resume.
Signed-off-by: AngeloGioacchino Del Regno
---
drivers/gpu/drm
in
mtk_dp_update_plugged_status(): if not, we simply return immediately.
While at it, since the update_plugged_status_lock mutex would not be
used if the controller doesn't support audio at all, initialize it
only if `audio_supported` is true.
Signed-off-by: AngeloGioacchino Del Regno
---
drivers/gpu/drm
Move the register write to MTK_DP_AUX_P0_3690 to set the AUX reply mode
to function mtk_dp_initialize_aux_settings(), as this is effectively
part of the DPTX AUX setup sequence.
Signed-off-by: AngeloGioacchino Del Regno
Tested-by: Chen-Yu Tsai
---
drivers/gpu/drm/mediatek/mtk_dp.c | 9
backlight = <_lcd0>;
port {
panel_in: endpoint {
remote-endpoint = <_out>;
};
};
};
};
};
AngeloGioacchino De
or not, it takes the same time
and anyway the DP hardware won't produce any error (or, if it
does, it's ignorable because it won't block further commands)
- Second, training the link between a sleeping/standby/unpowered
display makes little sense.
Signed-off-by: AngeloGioacchino Del Regno
potentially start happening in a later commit implementing
aux-bus support, as AUX transfers will be triggered from the panel
driver (for EDID) before the mtk-dp bridge gets attached, and it's
done in preparation for the same.
Signed-off-by: AngeloGioacchino Del Regno
Tested-by: Chen-Yu Tsai
Il 12/04/23 13:52, AngeloGioacchino Del Regno ha scritto:
This is a small cleanup of the mtk-dpi driver, switching it to devm
variants where possible and where it made sense, and reducing lines
while retaining and improving human readability.
AngeloGioacchino Del Regno (4):
drm/mediatek
Il 11/07/23 08:13, Dan Carpenter ha scritto:
Negative -EINVAL was intended instead of positive EINVAL.
Fixes: 6a23afad443a ("phy: phy-mtk-dp: Add driver for DP phy")
Signed-off-by: Dan Carpenter
Reviewed-by: AngeloGioacchino Del Regno
river for Mediatek SoC MT8173.")
Signed-off-by: Jason-JH.Lin
Reviewed-by: AngeloGioacchino Del Regno
---
drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
b/drivers/gpu/drm/mediatek/mtk_drm_cr
Il 09/07/23 18:26, Jason-JH.Lin ha scritto:
OVL layer should not be enabled before crtc is enabled.
The plane_state of drm_atomic_state is not sync to
the plane_state stored in mtk_crtc during crtc enabling,
so just set all planes to disabled.
Please add the relevant Fixes tag and resend.
(),
to avoid using the old FB which could be freed.
Fixes: 1a64a7aff8da ("drm/mediatek: Fix cursor plane no update")
Signed-off-by: Jason-JH.Lin
Reviewed-by: AngeloGioacchino Del Regno
Il 07/07/23 10:23, Chen-Yu Tsai ha scritto:
On Thu, Jul 6, 2023 at 8:30 PM AngeloGioacchino Del Regno
wrote:
Changes in v4:
- Set data lanes to idle to prevent stalls if bootloader didn't
properly close the eDP port
- Now using the .done_probing() callback for AUX bus to prevent
Il 26/06/23 20:58, Sui Jingfeng ha scritto:
Also return -ENOMEM if such a failure happens, the implement should take
responsibility for the error handling.
Signed-off-by: Sui Jingfeng
This commit needs a Fixes tag. Please add the relevant one and resend.
Thanks,
Angelo
---
arated aux-bus, it was necessary to add an exclusion for the
cable_plugged_in check in `mtk_dp_aux_transfer()` and the easiest
way to do this is to simply ignore checking that when the bridge
type is eDP.
Signed-off-by: AngeloGioacchino Del Regno
---
drivers/gpu/drm/mediatek/mtk
or not, it takes the same time
and anyway the DP hardware won't produce any error (or, if it
does, it's ignorable because it won't block further commands)
- Second, training the link between a sleeping/standby/unpowered
display makes little sense.
Signed-off-by: AngeloGioacchino Del Regno
In preparation for adding support for aux-bus, which will add a code
path that may fail after the drm_bridge_add() call, change that to
devm_drm_bridge_add() to simplify failure paths later.
Signed-off-by: AngeloGioacchino Del Regno
Tested-by: Chen-Yu Tsai
---
drivers/gpu/drm/mediatek
remains unpowered until resources
are made available.
Signed-off-by: AngeloGioacchino Del Regno
Tested-by: Chen-Yu Tsai
---
drivers/gpu/drm/mediatek/mtk_dp.c | 15 ++-
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/mediatek/mtk_dp.c
b/drivers/gpu/drm
eDP panels are not removable: at PM resume, the cable will obviously
still be plugged in.
Signed-off-by: AngeloGioacchino Del Regno
Tested-by: Chen-Yu Tsai
---
drivers/gpu/drm/mediatek/mtk_dp.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/mediatek/mtk_dp.c
b/drivers
Move the register write to MTK_DP_AUX_P0_3690 to set the AUX reply mode
to function mtk_dp_initialize_aux_settings(), as this is effectively
part of the DPTX AUX setup sequence.
Signed-off-by: AngeloGioacchino Del Regno
Tested-by: Chen-Yu Tsai
---
drivers/gpu/drm/mediatek/mtk_dp.c | 9
potentially start happening in a later commit implementing
aux-bus support, as AUX transfers will be triggered from the panel
driver (for EDID) before the mtk-dp bridge gets attached, and it's
done in preparation for the same.
Signed-off-by: AngeloGioacchino Del Regno
Tested-by: Chen-Yu Tsai
If this is an eDP panel it's not removable, hence it's always connected:
as a shortcut, always return connector_status_connected in the .detect()
callback for eDP connector, avoiding a poweron, a check for sink count
and a poweroff.
Signed-off-by: AngeloGioacchino Del Regno
Tested-by: Chen-Yu
port {
panel_in: endpoint {
remote-endpoint = <_out>;
};
};
};
};
};
AngeloGioacchino Del Regno (9):
drm/mediatek: dp: Cache EDID for eDP panel
drm/mediatek: dp: Move AUX and panel poweron/off sequence to function
drm/m
k training.
Signed-off-by: AngeloGioacchino Del Regno
Reviewed-by: Matthias Brugger
Tested-by: Chen-Yu Tsai
---
drivers/gpu/drm/mediatek/mtk_dp.c | 11 ++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/mediatek/mtk_dp.c
b/drivers/gpu/drm/mediatek/mtk_
Il 06/07/23 04:14, Shuijing Li ha scritto:
Mainly add the following two flag:
1.The audio packet arrangement function is to only arrange audio
packets into the Hblanking area. In order to align with the HW
default setting of g1200, this function needs to be turned off.
2.Due to the difference
Il 06/07/23 04:14, Shuijing Li ha scritto:
Add dt-binding documentation of dp-tx for MediaTek MT8188 SoC.
Signed-off-by: Shuijing Li
Signed-off-by: Jitao Shi
Reviewed-by: AngeloGioacchino Del Regno
Convert all instances of dev_err() -> return to dev_err_probe() and
where it makes sense to, change instances of `return ret` at the end
of probe functions to `return 0`, as errors are returned earlier.
Signed-off-by: AngeloGioacchino Del Regno
Reviewed-by: Alexandre Mergnat
Reviewed-by: CK
a
dev_dbg() in mtk_hdmi_ddc.c that was printing the iospace start/end.
This commit brings no functional changes.
Signed-off-by: AngeloGioacchino Del Regno
---
drivers/gpu/drm/mediatek/mtk_cec.c| 3 +--
drivers/gpu/drm/mediatek/mtk_disp_aal.c | 4 +---
drivers/gpu/drm/mediatek/mtk_disp_ccorr.c
Simplify the error path of return functions and drop the call to
pm_runtime_disable() in remove functions by switching to
devm_pm_runtime_enable() where possible.
Signed-off-by: AngeloGioacchino Del Regno
Reviewed-by: Alexandre Mergnat
Reviewed-by: CK Hu
---
drivers/gpu/drm/mediatek
devm_platform_get_and_ioremap_resource() to dropping
struct resource pointer with using devm_platform_ioremap_resource()
AngeloGioacchino Del Regno (3):
drm/mediatek: Use devm_platform_ioremap_resource()
drm/mediatek: Use dev_err_probe() in probe functions
drm/mediatek: Use devm variant for pm_runtime_enable() when
Il 04/07/23 11:04, Yongqiang Niu ha scritto:
dma buffer release before overlay disable, that will cause
m4u translation fault warning.
add dma buffer control flow in mediatek driver:
get dma buffer when drm plane disable
put dma buffer when overlay really disable
Fixes: 41016fe1028e4 ("drm:
In order to enhance human readability, separating the optional
CMDQ mailbox initialization from the rest of the CRTC creation
machinery, move it to a new mtk_drm_cmdq_init() function.
Signed-off-by: AngeloGioacchino Del Regno
---
drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 83
all instances of `#if IS_REACHABLE(CONFIG_MTK_CMDQ)`
from all drivers in drm/mediatek.
Signed-off-by: AngeloGioacchino Del Regno
---
drivers/gpu/drm/mediatek/mtk_disp_aal.c | 2 --
drivers/gpu/drm/mediatek/mtk_disp_ccorr.c | 2 --
drivers/gpu/drm/mediatek/mtk_disp_color.c | 2
to pass (in this case) a mtk_crtc
handle to the ddp_cmdq_cb() mailbox RX callback function.
Signed-off-by: AngeloGioacchino Del Regno
---
drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 107 +++-
include/linux/soc/mediatek/mtk-cmdq.h | 1 +
2 files changed, 32 insertions(+), 76
] and [2].
[1]:
https://lore.kernel.org/lkml/20230524093412.92211-1-angelogioacchino.delre...@collabora.com
[2]:
https://lore.kernel.org/lkml/20230608084727.74403-1-angelogioacchino.delre...@collabora.com
AngeloGioacchino Del Regno (3):
drm/mediatek: Dynamically allocate CMDQ and use helper functions
Il 23/05/23 12:42, AngeloGioacchino Del Regno ha scritto:
Due to the initial confusion about MIPI_DSI_MODE_EOT_PACKET, properly
renamed to MIPI_DSI_MODE_NO_EOT_PACKET, reflecting its actual meaning,
both the DSI_TXRX_CON register setting for bit (HSTX_)DIS_EOT and the
later calculation
-off-by: Jason-JH.Lin
Fixes: 5ddb0bd4ddc3 ("drm/atomic: Pass the full state to planes async atomic check
and update")
Fixes before S-o-b...
Reviewed-by: AngeloGioacchino Del Regno
Il 13/06/23 13:32, Jason-JH.Lin ha scritto:
1. Add casting before assign to avoid the unintentional integer
overflow or unintended sign extension.
2. Add a int varriable for multiplier calculation instead of calculating
different types multiplier with dma_addr_t varriable directly.
fore your S-o-b tag.
Anyway,
Reviewed-by: AngeloGioacchino Del Regno
---
drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 7 ++-
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
index d40142842f85.
terminator.
So change cnt to unsigned int and check its max value.
Signed-off-by: Jason-JH.Lin
Fixes: 1ef7ed48356c ("drm/mediatek: Modify mediatek-drm for mt8195 multi mmsys
support")
Fixes tag goes before your S-o-b tag.
Anyway,
Reviewed-by: AngeloGioacchino Del Regno
---
d
Il 12/06/23 11:01, AngeloGioacchino Del Regno ha scritto:
Changes in v6:
- Fixed smatch warning in patch 11/11, ref.:
https://lore.kernel.org/all/202306101458.lrxhee0z-...@intel.com/
This series is fully ready. CK, can we get this one and the mtk-dp series [1]
in -next for this cycle
Il 13/06/23 01:32, Douglas Anderson ha scritto:
In order to read the EDID from an eDP panel, you not only need to
power on the bridge chip itself but also the panel. In the ps8640
driver, this was made to work by having the bridge chip manually power
the panel on by calling pre_enable() on
All of the SoCs that don't have dithering control in the gamma IP
have got a GAMMA_LUT_TYPE bit that tells to the IP if the LUT is
"descending" (bit set) or "rising" (bit cleared): make sure to set
it correctly after programming the LUT.
Signed-off-by: AngeloGioacchino
all
of the writes to make use of CMDQ instead of cpu writes and that's
not trivial. For this reason, this patch only moves the LUT enable.
The CMDQ rework will come at a later time.
Signed-off-by: AngeloGioacchino Del Regno
Reviewed-by: Jason-JH.Lin
---
drivers/gpu/drm/mediatek/mtk_disp_gamma.c
Add support for 12-bit gamma lookup tables and introduce the first
user for it: MT8195.
While at it, also reorder the variables in mtk_gamma_set_common()
and rename `lut_base` to `lut0_base` to improve readability.
Signed-off-by: AngeloGioacchino Del Regno
Reviewed-by: Jason-JH.Lin
Del Regno
Reviewed-by: Jason-JH.Lin
---
drivers/gpu/drm/mediatek/mtk_disp_gamma.c | 18 --
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/mediatek/mtk_disp_gamma.c
b/drivers/gpu/drm/mediatek/mtk_disp_gamma.c
index f4bf5b37992c..407fb0264b80 100644
Invert the check for state->gamma_lut and move it at the beginning
of the function to reduce indentation: this prepares the code for
keeping readability on later additions.
This commit brings no functional changes.
Signed-off-by: AngeloGioacchino Del Regno
Reviewed-by: Jason-JH.
Make the code more robust and improve readability by using bitfield
macros instead of open coding bit operations.
While at it, also add a definition for LUT_BITS_DEFAULT.
Signed-off-by: AngeloGioacchino Del Regno
Reviewed-by: Jason-JH.Lin
---
drivers/gpu/drm/mediatek/mtk_disp_gamma.c | 41
Newer SoCs support a bigger Gamma LUT table: wire up a callback
to retrieve the correct LUT size for each different Gamma IP.
Co-developed-by: Jason-JH.Lin
Signed-off-by: Jason-JH.Lin
[Angelo: Rewritten commit message/description + porting]
Signed-off-by: AngeloGioacchino Del Regno
Reviewed
]
Signed-off-by: AngeloGioacchino Del Regno
---
drivers/gpu/drm/mediatek/mtk_disp_gamma.c | 74 ++-
1 file changed, 47 insertions(+), 27 deletions(-)
diff --git a/drivers/gpu/drm/mediatek/mtk_disp_gamma.c
b/drivers/gpu/drm/mediatek/mtk_disp_gamma.c
index 407fb0264b80
Disable relay mode at the end of LUT programming to make sure that the
processed image goes through.
Signed-off-by: AngeloGioacchino Del Regno
Reviewed-by: Jason-JH.Lin
---
drivers/gpu/drm/mediatek/mtk_disp_gamma.c | 4
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm
the subtractions on the 16-bits values and
doing the 10 bits conversion later.
Signed-off-by: AngeloGioacchino Del Regno
Reviewed-by: Jason-JH.Lin
---
drivers/gpu/drm/mediatek/mtk_disp_gamma.c | 30 +++
1 file changed, 20 insertions(+), 10 deletions(-)
diff --git a/drivers
From: "Jason-JH.Lin"
Adjust the parameters in mtk_drm_gamma_set_common()
- add (struct device *dev) to get lut_diff from gamma's driver data
- remove (bool lut_diff) and use false as default value in the function
Signed-off-by: Jason-JH.Lin
Signed-off-by: AngeloGioacchino
:
* MT6795, MT8192, MT8173: No regression, works fine.
* MT8195: Color correction is finally working!
AngeloGioacchino Del Regno (10):
drm/mediatek: gamma: Reduce indentation in mtk_gamma_set_common()
drm/mediatek: gamma: Support SoC specific LUT size
drm/mediatek: gamma: Improve and simplify HW
in 'mtk_disp_ccorr'
Cc: Chun-Kuang Hu
Cc: Philipp Zabel
Cc: David Airlie
Cc: Daniel Vetter
Cc: Matthias Brugger
Cc: AngeloGioacchino Del Regno
Cc: dri-devel@lists.freedesktop.org
Cc: linux-media...@lists.infradead.org
Cc: linux-arm-ker...@lists.infradead.org
Signed-off-by: Lee Jones
Reviewed
: Chun-Kuang Hu
Cc: Philipp Zabel
Cc: David Airlie
Cc: Daniel Vetter
Cc: Matthias Brugger
Cc: AngeloGioacchino Del Regno
Cc: dri-devel@lists.freedesktop.org
Cc: linux-media...@lists.infradead.org
Cc: linux-arm-ker...@lists.infradead.org
Signed-off-by: Lee Jones
Reviewed-by: AngeloGioacchino
Simplify the error path of return functions and drop the call to
pm_runtime_disable() in remove functions by switching to
devm_pm_runtime_enable() where possible.
Signed-off-by: AngeloGioacchino Del Regno
---
drivers/gpu/drm/mediatek/mtk_disp_ovl_adaptor.c | 9 -
drivers/gpu/drm
Convert all instances of dev_err() -> return to dev_err_probe() and
where it makes sense to, change instances of `return ret` at the end
of probe functions to `return 0`, as errors are returned earlier.
Signed-off-by: AngeloGioacchino Del Regno
---
drivers/gpu/drm/mediatek/mtk_ce
Instead of open coding calls to platform_get_resource() followed by
devm_ioremap_resource(), perform a single call to the helper
devm_platform_get_and_ioremap_resource().
This commit brings no functional changes.
Signed-off-by: AngeloGioacchino Del Regno
---
drivers/gpu/drm/mediatek/mtk_cec.c
This series performs some cleanups in drm/mediatek; specifically, changes
it to use devm_platform_get_and_ioremap_resource(), dev_err_probe() and
devm_pm_runtime_enable, hence harmonizing log formats and removing some
unneeded lines of code.
AngeloGioacchino Del Regno (3):
drm/mediatek: Use
Il 07/06/23 12:21, Laura Nao ha scritto:
Add a panel entry for the AUO B116XAB01.4 edp panel, found in the Acer
Chromebook Spin 311 (CP311-3H) laptop.
Signed-off-by: Laura Nao
Reviewed-by: AngeloGioacchino Del Regno
All of the SoCs that don't have dithering control in the gamma IP
have got a GAMMA_LUT_TYPE bit that tells to the IP if the LUT is
"descending" (bit set) or "rising" (bit cleared): make sure to set
it correctly after programming the LUT.
Signed-off-by: AngeloGioacchino
601 - 700 of 1474 matches
Mail list logo