From 1543e317f1da31b75942316931e8f491a8920811 Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Thu, 04 Jan 2024 10:08:02 +0000
Subject: [PATCH] disable FB
---
kernel/drivers/gpu/drm/rockchip/rk618/rk618_lvds.c | 20 +++++---------------
1 files changed, 5 insertions(+), 15 deletions(-)
diff --git a/kernel/drivers/gpu/drm/rockchip/rk618/rk618_lvds.c b/kernel/drivers/gpu/drm/rockchip/rk618/rk618_lvds.c
index 83ee5f0..b652e19 100644
--- a/kernel/drivers/gpu/drm/rockchip/rk618/rk618_lvds.c
+++ b/kernel/drivers/gpu/drm/rockchip/rk618/rk618_lvds.c
@@ -12,12 +12,13 @@
#include <linux/regmap.h>
#include <linux/mfd/rk618.h>
-#include <drm/drmP.h>
+#include <drm/drm_drv.h>
#include <drm/drm_of.h>
#include <drm/drm_atomic.h>
#include <drm/drm_crtc_helper.h>
#include <drm/drm_atomic_helper.h>
#include <drm/drm_panel.h>
+#include <drm/drm_probe_helper.h>
#include <video/of_display_timing.h>
#include <video/videomode.h>
@@ -70,7 +71,7 @@
u32 bus_format = MEDIA_BUS_FMT_RGB888_1X24;
int num_modes = 0;
- num_modes = drm_panel_get_modes(lvds->panel);
+ num_modes = drm_panel_get_modes(lvds->panel, connector);
if (info->num_bus_formats)
lvds->bus_format = info->bus_formats[0];
@@ -97,9 +98,6 @@
static void rk618_lvds_connector_destroy(struct drm_connector *connector)
{
- struct rk618_lvds *lvds = connector_to_lvds(connector);
-
- drm_panel_detach(lvds->panel);
drm_connector_cleanup(connector);
}
@@ -124,9 +122,6 @@
rk618_frc_dither_init(lvds->parent, lvds->bus_format);
switch (lvds->bus_format) {
- case MEDIA_BUS_FMT_RGB666_1X7X3_JEIDA:
- format = LVDS_FORMAT_JEIDA_18BIT;
- break;
case MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA:
format = LVDS_FORMAT_JEIDA_24BIT;
break;
@@ -170,7 +165,8 @@
clk_disable_unprepare(lvds->clock);
}
-static int rk618_lvds_bridge_attach(struct drm_bridge *bridge)
+static int rk618_lvds_bridge_attach(struct drm_bridge *bridge,
+ enum drm_bridge_attach_flags flags)
{
struct rk618_lvds *lvds = bridge_to_lvds(bridge);
struct drm_connector *connector = &lvds->connector;
@@ -186,12 +182,6 @@
drm_connector_helper_add(connector, &rk618_lvds_connector_helper_funcs);
drm_connector_attach_encoder(connector, bridge->encoder);
-
- ret = drm_panel_attach(lvds->panel, connector);
- if (ret) {
- dev_err(lvds->dev, "Failed to attach panel\n");
- return ret;
- }
lvds->sub_dev.connector = &lvds->connector;
lvds->sub_dev.of_node = lvds->dev->of_node;
--
Gitblit v1.6.2