forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 61598093bbdd283a7edc367d900f223070ead8d2
kernel/drivers/gpu/arm/mali400/mali/platform/rk/rk.c
....@@ -34,8 +34,6 @@
3434 #include <linux/dma-mapping.h>
3535 #include <linux/pm_runtime.h>
3636 #include <linux/delay.h>
37
-#include <linux/regmap.h>
38
-#include <linux/mfd/syscon.h>
3937 #include <linux/rockchip/cpu.h>
4038 #include <soc/rockchip/rockchip_ipa.h>
4139 #include <soc/rockchip/rockchip_opp_select.h>
....@@ -50,7 +48,6 @@
5048
5149 /*---------------------------------------------------------------------------*/
5250
53
-#define RK3528_GPU_SD_SLP_HAST 0x10024
5451 #define DEFAULT_UTILISATION_PERIOD_IN_MS (100)
5552
5653 /*
....@@ -59,7 +56,6 @@
5956 struct rk_context {
6057 /* mali device. */
6158 struct device *dev;
62
- struct regmap *grf;
6359 /* is the GPU powered on? */
6460 bool is_powered;
6561 /* debug only, the period in ms to count gpu_utilisation. */
....@@ -188,10 +184,6 @@
188184 }
189185
190186 platform->dev = dev;
191
- platform->grf = syscon_regmap_lookup_by_phandle(dev->of_node,
192
- "rockchip,grf");
193
- if (IS_ERR(platform->grf))
194
- platform->grf = NULL;
195187 platform->is_powered = false;
196188
197189 platform->utilisation_period = DEFAULT_UTILISATION_PERIOD_IN_MS;
....@@ -476,12 +468,7 @@
476468
477469 clk_set_rate(mdev->clock, mdev->current_freq);
478470 #endif
479
- if (platform->grf)
480
- regmap_write(platform->grf,
481
- RK3528_GPU_SD_SLP_HAST,
482
- 0xffff0000);
483471 }
484
-
485472 platform->is_powered = true;
486473 }
487474
....@@ -506,10 +493,6 @@
506493 //use normal pll 200M for gpu when suspend
507494 clk_set_rate(mdev->clock, 200000000);
508495 #endif
509
- if (platform->grf)
510
- regmap_write(platform->grf,
511
- RK3528_GPU_SD_SLP_HAST,
512
- 0xfffffffd);
513496 }
514497 rk_platform_disable_clk_gpu(dev);
515498 rk_platform_disable_gpu_regulator(dev);