mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-23 05:56:14 -04:00
drm/mediatek: separate color module to fixup error memory reallocation
Previous patch (c5f228ef6cdrm/mediatek: add *driver_data for different hardware settings) calls devm_kfree() and then devm_kzalloc() to reallocate color module data structure. But this reallocation cannnot guarantee the new address is unchanged, but the caller will use the old address, which is wrong. Fix it by separate color module from general components, this patch separate color module to independent files, like mtk_disp_ovl.c and mtk_disp_rdma.c do Fixes:c5f228ef6c("drm/mediatek: add *driver_data for different hardware settings") Signed-off-by: YT Shen <yt.shen@mediatek.com> Tested-by: Bibby Hsieh <bibby.hsieh@mediatek.com> Signed-off-by: CK Hu <ck.hu@mediatek>
This commit is contained in:
committed by
CK Hu
parent
4a3bfb5c24
commit
5ac5895a84
@@ -439,11 +439,12 @@ static int mtk_drm_probe(struct platform_device *pdev)
|
||||
private->comp_node[comp_id] = of_node_get(node);
|
||||
|
||||
/*
|
||||
* Currently only the OVL, RDMA, DSI, and DPI blocks have
|
||||
* Currently only the COLOR, OVL, RDMA, DSI, and DPI blocks have
|
||||
* separate component platform drivers and initialize their own
|
||||
* DDP component structure. The others are initialized here.
|
||||
*/
|
||||
if (comp_type == MTK_DISP_OVL ||
|
||||
if (comp_type == MTK_DISP_COLOR ||
|
||||
comp_type == MTK_DISP_OVL ||
|
||||
comp_type == MTK_DISP_RDMA ||
|
||||
comp_type == MTK_DSI ||
|
||||
comp_type == MTK_DPI) {
|
||||
@@ -566,6 +567,7 @@ static struct platform_driver mtk_drm_platform_driver = {
|
||||
|
||||
static struct platform_driver * const mtk_drm_drivers[] = {
|
||||
&mtk_ddp_driver,
|
||||
&mtk_disp_color_driver,
|
||||
&mtk_disp_ovl_driver,
|
||||
&mtk_disp_rdma_driver,
|
||||
&mtk_dpi_driver,
|
||||
|
||||
Reference in New Issue
Block a user