Commit c66705c5 authored by Alex Hung's avatar Alex Hung Committed by Alex Deucher

Revert "drm/amd/display: Create amdgpu_dm_wb_connector"

This reverts commit a5f9523c.

[WHY & HOW]
The writeback series cause a regression in thunderbolt display.
Signed-off-by: default avatarAlex Hung <alex.hung@amd.com>
Reviewed-by: default avatarHarry Wentland <harry.wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 6ec0e23f
...@@ -4496,14 +4496,14 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev) ...@@ -4496,14 +4496,14 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)
link = dc_get_link_at_index(dm->dc, i); link = dc_get_link_at_index(dm->dc, i);
if (link->connector_signal == SIGNAL_TYPE_VIRTUAL) { if (link->connector_signal == SIGNAL_TYPE_VIRTUAL) {
struct amdgpu_dm_wb_connector *wbcon = kzalloc(sizeof(*wbcon), GFP_KERNEL); struct drm_writeback_connector *wbcon = kzalloc(sizeof(*wbcon), GFP_KERNEL);
if (!wbcon) { if (!wbcon) {
DRM_ERROR("KMS: Failed to allocate writeback connector\n"); DRM_ERROR("KMS: Failed to allocate writeback connector\n");
continue; continue;
} }
if (amdgpu_dm_wb_connector_init(dm, wbcon, i)) { if (amdgpu_dm_wb_connector_init(dm, wbcon)) {
DRM_ERROR("KMS: Failed to initialize writeback connector\n"); DRM_ERROR("KMS: Failed to initialize writeback connector\n");
kfree(wbcon); kfree(wbcon);
continue; continue;
...@@ -7592,7 +7592,6 @@ static int amdgpu_dm_connector_init(struct amdgpu_display_manager *dm, ...@@ -7592,7 +7592,6 @@ static int amdgpu_dm_connector_init(struct amdgpu_display_manager *dm,
struct dc_link *link = dc_get_link_at_index(dc, link_index); struct dc_link *link = dc_get_link_at_index(dc, link_index);
struct amdgpu_i2c_adapter *i2c; struct amdgpu_i2c_adapter *i2c;
/* Not needed for writeback connector */
link->priv = aconnector; link->priv = aconnector;
......
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
#include <drm/drm_crtc.h> #include <drm/drm_crtc.h>
#include <drm/drm_plane.h> #include <drm/drm_plane.h>
#include "link_service_types.h" #include "link_service_types.h"
#include <drm/drm_writeback.h>
/* /*
* This file contains the definition for amdgpu_display_manager * This file contains the definition for amdgpu_display_manager
...@@ -715,13 +714,6 @@ static inline void amdgpu_dm_set_mst_status(uint8_t *status, ...@@ -715,13 +714,6 @@ static inline void amdgpu_dm_set_mst_status(uint8_t *status,
#define to_amdgpu_dm_connector(x) container_of(x, struct amdgpu_dm_connector, base) #define to_amdgpu_dm_connector(x) container_of(x, struct amdgpu_dm_connector, base)
struct amdgpu_dm_wb_connector {
struct drm_writeback_connector base;
struct dc_link *link;
};
#define to_amdgpu_dm_wb_connector(x) container_of(x, struct amdgpu_dm_wb_connector, base)
extern const struct amdgpu_ip_block_version dm_ip_block; extern const struct amdgpu_ip_block_version dm_ip_block;
struct dm_plane_state { struct dm_plane_state {
......
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
#include "amdgpu_dm.h" #include "amdgpu_dm.h"
#include "amdgpu_dm_wb.h" #include "amdgpu_dm_wb.h"
#include "amdgpu_display.h" #include "amdgpu_display.h"
#include "dc.h"
#include <drm/drm_atomic_state_helper.h> #include <drm/drm_atomic_state_helper.h>
#include <drm/drm_modeset_helper_vtables.h> #include <drm/drm_modeset_helper_vtables.h>
...@@ -184,18 +183,13 @@ static const struct drm_connector_helper_funcs amdgpu_dm_wb_conn_helper_funcs = ...@@ -184,18 +183,13 @@ static const struct drm_connector_helper_funcs amdgpu_dm_wb_conn_helper_funcs =
}; };
int amdgpu_dm_wb_connector_init(struct amdgpu_display_manager *dm, int amdgpu_dm_wb_connector_init(struct amdgpu_display_manager *dm,
struct amdgpu_dm_wb_connector *wbcon, struct drm_writeback_connector *wbcon)
uint32_t link_index)
{ {
struct dc *dc = dm->dc;
struct dc_link *link = dc_get_link_at_index(dc, link_index);
int res = 0; int res = 0;
wbcon->link = link; drm_connector_helper_add(&wbcon->base, &amdgpu_dm_wb_conn_helper_funcs);
drm_connector_helper_add(&wbcon->base.base, &amdgpu_dm_wb_conn_helper_funcs); res = drm_writeback_connector_init(&dm->adev->ddev, wbcon,
res = drm_writeback_connector_init(&dm->adev->ddev, &wbcon->base,
&amdgpu_dm_wb_connector_funcs, &amdgpu_dm_wb_connector_funcs,
&amdgpu_dm_wb_encoder_helper_funcs, &amdgpu_dm_wb_encoder_helper_funcs,
amdgpu_dm_wb_formats, amdgpu_dm_wb_formats,
...@@ -208,8 +202,8 @@ int amdgpu_dm_wb_connector_init(struct amdgpu_display_manager *dm, ...@@ -208,8 +202,8 @@ int amdgpu_dm_wb_connector_init(struct amdgpu_display_manager *dm,
* Some of the properties below require access to state, like bpc. * Some of the properties below require access to state, like bpc.
* Allocate some default initial connector state with our reset helper. * Allocate some default initial connector state with our reset helper.
*/ */
if (wbcon->base.base.funcs->reset) if (wbcon->base.funcs->reset)
wbcon->base.base.funcs->reset(&wbcon->base.base); wbcon->base.funcs->reset(&wbcon->base);
return 0; return 0;
} }
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
#include <drm/drm_writeback.h> #include <drm/drm_writeback.h>
int amdgpu_dm_wb_connector_init(struct amdgpu_display_manager *dm, int amdgpu_dm_wb_connector_init(struct amdgpu_display_manager *dm,
struct amdgpu_dm_wb_connector *dm_wbcon, struct drm_writeback_connector *wbcon);
uint32_t link_index);
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment