Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6fad8f66 authored by Thierry Reding's avatar Thierry Reding
Browse files

drm/tegra: sor: Demidlayer



Implement encoder and connector within the eDP driver itself using the
Tegra output helpers rather than using the Tegra output as midlayer. By
doing so one level of indirection is removed and output drivers become
more flexible while keeping the majority of the advantages provided by
the common output helpers.

Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
parent 5b901e78
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -192,16 +192,11 @@ struct tegra_output_ops {
	enum drm_connector_status (*detect)(struct tegra_output *output);
};

enum tegra_output_type {
	TEGRA_OUTPUT_EDP,
};

struct tegra_output {
	struct device_node *of_node;
	struct device *dev;

	const struct tegra_output_ops *ops;
	enum tegra_output_type type;

	struct drm_panel *panel;
	struct i2c_adapter *ddc;
+2 −13
Original line number Diff line number Diff line
@@ -271,19 +271,8 @@ int tegra_output_remove(struct tegra_output *output)

int tegra_output_init(struct drm_device *drm, struct tegra_output *output)
{
	int connector, encoder;

	switch (output->type) {
	case TEGRA_OUTPUT_EDP:
		connector = DRM_MODE_CONNECTOR_eDP;
		encoder = DRM_MODE_ENCODER_TMDS;
		break;

	default:
		connector = DRM_MODE_CONNECTOR_Unknown;
		encoder = DRM_MODE_ENCODER_NONE;
		break;
	}
	int connector = DRM_MODE_CONNECTOR_Unknown;
	int encoder = DRM_MODE_ENCODER_NONE;

	drm_connector_init(drm, &output->connector, &connector_funcs,
			   connector);
+434 −376

File changed.

Preview size limit exceeded, changes collapsed.