Displaying 20 results from an estimated 67 matches for "drm_encoder_init".
2020 Mar 05
55
[PATCH 00/22] drm: Convert drivers to drm_simple_encoder_init()
...re
sophisticated encoders than that. Most drivers implement such a
simple encoder and can use drm_simple_encoder_init() instead.
The patchset converts drivers where the encoder's instance is
embedded in a larger data structure. The driver releases the
memory during cleanup. Each patch replaces drm_encoder_init() with
drm_simple_encoder_init() and removes the (now unused) driver's
encoder functions.
While the patchset is fairly large, the indiviual patches are self-
contained and can be merged independently from each other. The
simple-encoder functionality is currently in drm-misc-next, where
these p...
2020 Mar 05
55
[PATCH 00/22] drm: Convert drivers to drm_simple_encoder_init()
...re
sophisticated encoders than that. Most drivers implement such a
simple encoder and can use drm_simple_encoder_init() instead.
The patchset converts drivers where the encoder's instance is
embedded in a larger data structure. The driver releases the
memory during cleanup. Each patch replaces drm_encoder_init() with
drm_simple_encoder_init() and removes the (now unused) driver's
encoder functions.
While the patchset is fairly large, the indiviual patches are self-
contained and can be merged independently from each other. The
simple-encoder functionality is currently in drm-misc-next, where
these p...
2020 Mar 06
1
[PATCH 05/22] drm/gma500: Use simple encoder
...cdv_intel_crt_init(struct drm_device *dev,
> struct psb_intel_mode_device *mode_dev)
> {
> @@ -271,8 +264,7 @@ void cdv_intel_crt_init(struct drm_device *dev,
> &cdv_intel_crt_connector_funcs, DRM_MODE_CONNECTOR_VGA);
>
> encoder = &gma_encoder->base;
> - drm_encoder_init(dev, encoder,
> - &cdv_intel_crt_enc_funcs, DRM_MODE_ENCODER_DAC, NULL);
> + drm_simple_encoder_init(dev, encoder, DRM_MODE_ENCODER_DAC);
>
> gma_connector_attach_encoder(gma_connector, gma_encoder);
>
> diff --git a/drivers/gpu/drm/gma500/cdv_intel_dp.c b/drivers/gpu/d...
2020 Mar 05
0
[PATCH 12/22] drm/rockchip: Use simple encoder
...ip_dp_of_probe(struct rockchip_dp_device *dp)
{
struct device *dev = dp->dev;
@@ -309,8 +306,8 @@ static int rockchip_dp_drm_create_encoder(struct rockchip_dp_device *dp)
dev->of_node);
DRM_DEBUG_KMS("possible_crtcs = 0x%x\n", encoder->possible_crtcs);
- ret = drm_encoder_init(drm_dev, encoder, &rockchip_dp_encoder_funcs,
- DRM_MODE_ENCODER_TMDS, NULL);
+ ret = drm_simple_encoder_init(drm_dev, encoder,
+ DRM_MODE_ENCODER_TMDS);
if (ret) {
DRM_ERROR("failed to initialize encoder with drm\n");
return ret;
diff --git a/drivers/gpu/drm...
2020 Mar 07
1
[PATCH 00/22] drm: Convert drivers to drm_simple_encoder_init()
...ncoder and can use drm_simple_encoder_init() instead.
> > >>
> > >> The patchset converts drivers where the encoder's instance is
> > >> embedded in a larger data structure. The driver releases the
> > >> memory during cleanup. Each patch replaces drm_encoder_init() with
> > >> drm_simple_encoder_init() and removes the (now unused) driver's
> > >> encoder functions.
> > >>
> > >> While the patchset is fairly large, the indiviual patches are self-
> > >> contained and can be merged independently...
2020 Mar 05
0
[PATCH 05/22] drm/gma500: Use simple encoder
...intel_crt_enc_destroy,
-};
-
void cdv_intel_crt_init(struct drm_device *dev,
struct psb_intel_mode_device *mode_dev)
{
@@ -271,8 +264,7 @@ void cdv_intel_crt_init(struct drm_device *dev,
&cdv_intel_crt_connector_funcs, DRM_MODE_CONNECTOR_VGA);
encoder = &gma_encoder->base;
- drm_encoder_init(dev, encoder,
- &cdv_intel_crt_enc_funcs, DRM_MODE_ENCODER_DAC, NULL);
+ drm_simple_encoder_init(dev, encoder, DRM_MODE_ENCODER_DAC);
gma_connector_attach_encoder(gma_connector, gma_encoder);
diff --git a/drivers/gpu/drm/gma500/cdv_intel_dp.c b/drivers/gpu/drm/gma500/cdv_intel_dp.c
index...
2020 Mar 05
0
[PATCH 14/22] drm/sun4i: Use simple encoder
...odes(struct drm_connector *connector)
{
struct sun4i_hdmi *hdmi = drm_connector_to_sun4i_hdmi(connector);
@@ -611,11 +608,8 @@ static int sun4i_hdmi_bind(struct device *dev, struct device *master,
drm_encoder_helper_add(&hdmi->encoder,
&sun4i_hdmi_helper_funcs);
- ret = drm_encoder_init(drm,
- &hdmi->encoder,
- &sun4i_hdmi_funcs,
- DRM_MODE_ENCODER_TMDS,
- NULL);
+ ret = drm_simple_encoder_init(drm, &hdmi->encoder,
+ DRM_MODE_ENCODER_TMDS);
if (ret) {
dev_err(dev, "Couldn't initialise the HDMI encoder\n&q...
2020 Mar 05
0
[PATCH 03/22] drm/exynos: Use simple encoder
...t struct drm_encoder_funcs exynos_dp_encoder_funcs = {
- .destroy = drm_encoder_cleanup,
-};
-
static int exynos_dp_dt_parse_panel(struct exynos_dp_device *dp)
{
int ret;
@@ -174,8 +171,7 @@ static int exynos_dp_bind(struct device *dev, struct device *master, void *data)
return ret;
}
- drm_encoder_init(drm_dev, encoder, &exynos_dp_encoder_funcs,
- DRM_MODE_ENCODER_TMDS, NULL);
+ drm_simple_encoder_init(drm_dev, encoder, DRM_MODE_ENCODER_TMDS);
drm_encoder_helper_add(encoder, &exynos_dp_encoder_helper_funcs);
diff --git a/drivers/gpu/drm/exynos/exynos_drm_dpi.c b/drivers/gpu/drm/e...
2020 Feb 07
3
[PATCH 2/6] drm: Add drm_simple_encoder_{init,create}()
...| 10 +++
> 2 files changed, 126 insertions(+)
>
> diff --git a/drivers/gpu/drm/drm_encoder.c b/drivers/gpu/drm/drm_encoder.c
> index ffe691a1bf34..1a65cab1f310 100644
> --- a/drivers/gpu/drm/drm_encoder.c
> +++ b/drivers/gpu/drm/drm_encoder.c
> @@ -178,6 +178,122 @@ int drm_encoder_init(struct drm_device *dev,
> }
> EXPORT_SYMBOL(drm_encoder_init);
>
> +static const struct drm_encoder_funcs drm_simple_encoder_funcs_cleanup = {
> + .destroy = drm_encoder_cleanup,
> +};
> +
> +/**
> + * drm_simple_encoder_init - Init a preallocated encoder
> + * @de...
2020 Feb 07
3
[PATCH 2/6] drm: Add drm_simple_encoder_{init,create}()
...| 10 +++
> 2 files changed, 126 insertions(+)
>
> diff --git a/drivers/gpu/drm/drm_encoder.c b/drivers/gpu/drm/drm_encoder.c
> index ffe691a1bf34..1a65cab1f310 100644
> --- a/drivers/gpu/drm/drm_encoder.c
> +++ b/drivers/gpu/drm/drm_encoder.c
> @@ -178,6 +178,122 @@ int drm_encoder_init(struct drm_device *dev,
> }
> EXPORT_SYMBOL(drm_encoder_init);
>
> +static const struct drm_encoder_funcs drm_simple_encoder_funcs_cleanup = {
> + .destroy = drm_encoder_cleanup,
> +};
> +
> +/**
> + * drm_simple_encoder_init - Init a preallocated encoder
> + * @de...
2020 Mar 05
0
[PATCH 15/22] drm/tegra: Use simple encoder
...destroy = tegra_output_encoder_destroy,
-};
-
static void tegra_dsi_unprepare(struct tegra_dsi *dsi)
{
int err;
@@ -1058,9 +1055,8 @@ static int tegra_dsi_init(struct host1x_client *client)
&tegra_dsi_connector_helper_funcs);
dsi->output.connector.dpms = DRM_MODE_DPMS_OFF;
- drm_encoder_init(drm, &dsi->output.encoder,
- &tegra_dsi_encoder_funcs,
- DRM_MODE_ENCODER_DSI, NULL);
+ drm_simple_encoder_init(drm, &dsi->output.encoder,
+ DRM_MODE_ENCODER_DSI);
drm_encoder_helper_add(&dsi->output.encoder,
&tegra_dsi_encoder_helper_funcs);...
2020 Mar 05
0
[PATCH 18/22] drm/vc4: Use simple encoder
...i_encoder_disable(struct drm_encoder *encoder)
{
struct vc4_dpi_encoder *vc4_encoder = to_vc4_dpi_encoder(encoder);
@@ -309,8 +306,7 @@ static int vc4_dpi_bind(struct device *dev, struct device *master, void *data)
if (ret)
DRM_ERROR("Failed to turn on core clock: %d\n", ret);
- drm_encoder_init(drm, dpi->encoder, &vc4_dpi_encoder_funcs,
- DRM_MODE_ENCODER_DPI, NULL);
+ drm_simple_encoder_init(drm, dpi->encoder, DRM_MODE_ENCODER_DPI);
drm_encoder_helper_add(dpi->encoder, &vc4_dpi_encoder_helper_funcs);
ret = vc4_dpi_init_bridge(dpi);
diff --git a/drivers/gpu/drm/v...
2020 Mar 06
1
[PATCH 01/22] drm/arc: Use simple encoder
...rm_hdmi_init(struct drm_device *drm, struct device_node *np)
> {
> struct drm_encoder *encoder;
> @@ -34,8 +31,7 @@ int arcpgu_drm_hdmi_init(struct drm_device *drm, struct device_node *np)
>
> encoder->possible_crtcs = 1;
> encoder->possible_clones = 0;
> - ret = drm_encoder_init(drm, encoder, &arcpgu_drm_encoder_funcs,
> - DRM_MODE_ENCODER_TMDS, NULL);
> + ret = drm_simple_encoder_init(drm, encoder, DRM_MODE_ENCODER_TMDS);
> if (ret)
> return ret;
>
> diff --git a/drivers/gpu/drm/arc/arcpgu_sim.c b/drivers/gpu/drm/arc/arcpgu_sim.c
>...
2020 Feb 18
4
[PATCH v2 0/4] drm: Provide a simple encoder
Many DRM drivers implement an encoder with an empty implementation. This
patchset adds drm_simple_encoder_init() and drm_simple_encoder_create(),
which can be used by drivers instead. Except for the destroy callback, the
simple encoder's implementation is empty.
The patchset also converts 4 encoder instances to use the simple-encoder
helpers. But there are at least 11 other drivers which can
2020 Feb 07
2
[PATCH 2/6] drm: Add drm_simple_encoder_{init,create}()
...rns:
> + * Zero on success, error code on failure.
> + */
> +int drm_simple_encoder_init(struct drm_device *dev,
> + struct drm_encoder *encoder,
> + int encoder_type, const char *name, ...)
How about using
#define drm_simple_encoder_init(dev, type, name, ...) \
drm_encoder_init(dev, drm_simple_encoder_funcs_cleanup, type, name, __VA_ARGS__)
instead ?
cheers,
Gerd
2020 Feb 07
2
[PATCH 2/6] drm: Add drm_simple_encoder_{init,create}()
...rns:
> + * Zero on success, error code on failure.
> + */
> +int drm_simple_encoder_init(struct drm_device *dev,
> + struct drm_encoder *encoder,
> + int encoder_type, const char *name, ...)
How about using
#define drm_simple_encoder_init(dev, type, name, ...) \
drm_encoder_init(dev, drm_simple_encoder_funcs_cleanup, type, name, __VA_ARGS__)
instead ?
cheers,
Gerd
2020 Feb 07
0
[PATCH 2/6] drm: Add drm_simple_encoder_{init,create}()
...++++++++
include/drm/drm_encoder.h | 10 +++
2 files changed, 126 insertions(+)
diff --git a/drivers/gpu/drm/drm_encoder.c b/drivers/gpu/drm/drm_encoder.c
index ffe691a1bf34..1a65cab1f310 100644
--- a/drivers/gpu/drm/drm_encoder.c
+++ b/drivers/gpu/drm/drm_encoder.c
@@ -178,6 +178,122 @@ int drm_encoder_init(struct drm_device *dev,
}
EXPORT_SYMBOL(drm_encoder_init);
+static const struct drm_encoder_funcs drm_simple_encoder_funcs_cleanup = {
+ .destroy = drm_encoder_cleanup,
+};
+
+/**
+ * drm_simple_encoder_init - Init a preallocated encoder
+ * @dev: drm device
+ * @funcs: callbacks for this encod...
2020 Mar 06
3
[PATCH 00/22] drm: Convert drivers to drm_simple_encoder_init()
...ivers implement such a
>> simple encoder and can use drm_simple_encoder_init() instead.
>>
>> The patchset converts drivers where the encoder's instance is
>> embedded in a larger data structure. The driver releases the
>> memory during cleanup. Each patch replaces drm_encoder_init() with
>> drm_simple_encoder_init() and removes the (now unused) driver's
>> encoder functions.
>>
>> While the patchset is fairly large, the indiviual patches are self-
>> contained and can be merged independently from each other. The
>> simple-encoder funct...
2020 Mar 06
3
[PATCH 00/22] drm: Convert drivers to drm_simple_encoder_init()
...ivers implement such a
>> simple encoder and can use drm_simple_encoder_init() instead.
>>
>> The patchset converts drivers where the encoder's instance is
>> embedded in a larger data structure. The driver releases the
>> memory during cleanup. Each patch replaces drm_encoder_init() with
>> drm_simple_encoder_init() and removes the (now unused) driver's
>> encoder functions.
>>
>> While the patchset is fairly large, the indiviual patches are self-
>> contained and can be merged independently from each other. The
>> simple-encoder funct...
2020 Feb 07
0
[PATCH 2/6] drm: Add drm_simple_encoder_{init,create}()
...files changed, 126 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/drm_encoder.c b/drivers/gpu/drm/drm_encoder.c
>> index ffe691a1bf34..1a65cab1f310 100644
>> --- a/drivers/gpu/drm/drm_encoder.c
>> +++ b/drivers/gpu/drm/drm_encoder.c
>> @@ -178,6 +178,122 @@ int drm_encoder_init(struct drm_device *dev,
>> }
>> EXPORT_SYMBOL(drm_encoder_init);
>>
>> +static const struct drm_encoder_funcs drm_simple_encoder_funcs_cleanup = {
>> + .destroy = drm_encoder_cleanup,
>> +};
>> +
>> +/**
>> + * drm_simple_encoder_init - Init...