|
@@ -15,7 +15,6 @@
|
|
*/
|
|
*/
|
|
|
|
|
|
#include <drm/drm_crtc_helper.h>
|
|
#include <drm/drm_crtc_helper.h>
|
|
-#include <drm/drm_encoder_slave.h>
|
|
|
|
#include <drm/drm_atomic_helper.h>
|
|
#include <drm/drm_atomic_helper.h>
|
|
|
|
|
|
#include "arcpgu.h"
|
|
#include "arcpgu.h"
|
|
@@ -29,7 +28,6 @@
|
|
|
|
|
|
struct arcpgu_drm_connector {
|
|
struct arcpgu_drm_connector {
|
|
struct drm_connector connector;
|
|
struct drm_connector connector;
|
|
- struct drm_encoder_slave *encoder_slave;
|
|
|
|
};
|
|
};
|
|
|
|
|
|
static int arcpgu_drm_connector_get_modes(struct drm_connector *connector)
|
|
static int arcpgu_drm_connector_get_modes(struct drm_connector *connector)
|
|
@@ -68,7 +66,7 @@ static struct drm_encoder_funcs arcpgu_drm_encoder_funcs = {
|
|
int arcpgu_drm_sim_init(struct drm_device *drm, struct device_node *np)
|
|
int arcpgu_drm_sim_init(struct drm_device *drm, struct device_node *np)
|
|
{
|
|
{
|
|
struct arcpgu_drm_connector *arcpgu_connector;
|
|
struct arcpgu_drm_connector *arcpgu_connector;
|
|
- struct drm_encoder_slave *encoder;
|
|
|
|
|
|
+ struct drm_encoder *encoder;
|
|
struct drm_connector *connector;
|
|
struct drm_connector *connector;
|
|
int ret;
|
|
int ret;
|
|
|
|
|
|
@@ -76,10 +74,10 @@ int arcpgu_drm_sim_init(struct drm_device *drm, struct device_node *np)
|
|
if (encoder == NULL)
|
|
if (encoder == NULL)
|
|
return -ENOMEM;
|
|
return -ENOMEM;
|
|
|
|
|
|
- encoder->base.possible_crtcs = 1;
|
|
|
|
- encoder->base.possible_clones = 0;
|
|
|
|
|
|
+ encoder->possible_crtcs = 1;
|
|
|
|
+ encoder->possible_clones = 0;
|
|
|
|
|
|
- ret = drm_encoder_init(drm, &encoder->base, &arcpgu_drm_encoder_funcs,
|
|
|
|
|
|
+ ret = drm_encoder_init(drm, encoder, &arcpgu_drm_encoder_funcs,
|
|
DRM_MODE_ENCODER_VIRTUAL, NULL);
|
|
DRM_MODE_ENCODER_VIRTUAL, NULL);
|
|
if (ret)
|
|
if (ret)
|
|
return ret;
|
|
return ret;
|
|
@@ -101,21 +99,19 @@ int arcpgu_drm_sim_init(struct drm_device *drm, struct device_node *np)
|
|
goto error_encoder_cleanup;
|
|
goto error_encoder_cleanup;
|
|
}
|
|
}
|
|
|
|
|
|
- ret = drm_mode_connector_attach_encoder(connector, &encoder->base);
|
|
|
|
|
|
+ ret = drm_mode_connector_attach_encoder(connector, encoder);
|
|
if (ret < 0) {
|
|
if (ret < 0) {
|
|
dev_err(drm->dev, "could not attach connector to encoder\n");
|
|
dev_err(drm->dev, "could not attach connector to encoder\n");
|
|
drm_connector_unregister(connector);
|
|
drm_connector_unregister(connector);
|
|
goto error_connector_cleanup;
|
|
goto error_connector_cleanup;
|
|
}
|
|
}
|
|
|
|
|
|
- arcpgu_connector->encoder_slave = encoder;
|
|
|
|
-
|
|
|
|
return 0;
|
|
return 0;
|
|
|
|
|
|
error_connector_cleanup:
|
|
error_connector_cleanup:
|
|
drm_connector_cleanup(connector);
|
|
drm_connector_cleanup(connector);
|
|
|
|
|
|
error_encoder_cleanup:
|
|
error_encoder_cleanup:
|
|
- drm_encoder_cleanup(&encoder->base);
|
|
|
|
|
|
+ drm_encoder_cleanup(encoder);
|
|
return ret;
|
|
return ret;
|
|
}
|
|
}
|