R-Car DU v5.12 fix
-----BEGIN PGP SIGNATURE----- iQJWBAABCgBAFiEEy51od1KYIM1TCZsbZficN7xUIQ0FAmBQBjwiHGxhdXJlbnQu cGluY2hhcnRAaWRlYXNvbmJvYXJkLmNvbQAKCRBl+Jw3vFQhDafcD/4icVnZhvfM cQieaAOk/tGkrOyb1Ii+mIlzmcS47X6CHngRGLC2ULQGiNQTFlnHQNr2d2K3Z7oM OGumPY4mv7nLb4qfpJ3ncxWAf4FeZao1NzNarUqnVd25Aq9m+DKUOgYks/h8cEJ+ HV67FsAVenLhDmaGRdUJuF/HOv6WH4zhc0AOA8ytwYfYoyQIdTY2kuketPDGOYP4 Rcvl5dy+cPo98MXDi1t7QetmegyD/TtpDZAhSnCetFaYf4BrHkShO8HDtmGTVy7T W7mgh+99BXHkIv8rmDdGXaiDia3bmMtfNjjKimFTSD6SrKbSuoYwEg5jNsIbWlyz r+wubwC7yPMlt/xN26dI3nTL1ZXxRHu90+vne5ipdNpE/wgvBeFuotG8gepViaYT XeYuZcXwrfjFB+edwitDvxzDVTFk+9zfRBSXrlXpufz2SfQW+Bwjo51KAVZe4Xu9 1a+BchA8607vYRBR7cQHOalemDTZcqnUkwnABqYRmE+FJDRLUJA2KI84xEM708k6 mehzFtzhTNjlHgs+dhkeiL0vM5ClKkG9K5Wr3r6wkILR4H2EscK3B0E3T1rBFpve dgLH4iQH5ytJKUc1bjGXqkaA+4XYuHLgiPHz+GVYejvF52KkvzG7yW1HHYCtGuoG eFKci1DDc7/d9DFD0R9EF7cN5LDssmDGcg== =CRaa -----END PGP SIGNATURE----- Merge tag 'du-fixes-20210316' of git://linuxtv.org/pinchartl/media into drm-fixes R-Car DU v5.12 fix Signed-off-by: Dave Airlie <airlied@redhat.com> From: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Link: https://patchwork.freedesktop.org/patch/msgid/YFAG3ZMcWd1qW/Oo@pendragon.ideasonboard.com
This commit is contained in:
commit
d27ce83fa4
|
@ -48,21 +48,12 @@ static unsigned int rcar_du_encoder_count_ports(struct device_node *node)
|
|||
static const struct drm_encoder_funcs rcar_du_encoder_funcs = {
|
||||
};
|
||||
|
||||
static void rcar_du_encoder_release(struct drm_device *dev, void *res)
|
||||
{
|
||||
struct rcar_du_encoder *renc = res;
|
||||
|
||||
drm_encoder_cleanup(&renc->base);
|
||||
kfree(renc);
|
||||
}
|
||||
|
||||
int rcar_du_encoder_init(struct rcar_du_device *rcdu,
|
||||
enum rcar_du_output output,
|
||||
struct device_node *enc_node)
|
||||
{
|
||||
struct rcar_du_encoder *renc;
|
||||
struct drm_bridge *bridge;
|
||||
int ret;
|
||||
|
||||
/*
|
||||
* Locate the DRM bridge from the DT node. For the DPAD outputs, if the
|
||||
|
@ -101,26 +92,16 @@ int rcar_du_encoder_init(struct rcar_du_device *rcdu,
|
|||
return -ENOLINK;
|
||||
}
|
||||
|
||||
renc = kzalloc(sizeof(*renc), GFP_KERNEL);
|
||||
if (renc == NULL)
|
||||
return -ENOMEM;
|
||||
|
||||
renc->output = output;
|
||||
|
||||
dev_dbg(rcdu->dev, "initializing encoder %pOF for output %u\n",
|
||||
enc_node, output);
|
||||
|
||||
ret = drm_encoder_init(&rcdu->ddev, &renc->base, &rcar_du_encoder_funcs,
|
||||
DRM_MODE_ENCODER_NONE, NULL);
|
||||
if (ret < 0) {
|
||||
kfree(renc);
|
||||
return ret;
|
||||
}
|
||||
renc = drmm_encoder_alloc(&rcdu->ddev, struct rcar_du_encoder, base,
|
||||
&rcar_du_encoder_funcs, DRM_MODE_ENCODER_NONE,
|
||||
NULL);
|
||||
if (!renc)
|
||||
return -ENOMEM;
|
||||
|
||||
ret = drmm_add_action_or_reset(&rcdu->ddev, rcar_du_encoder_release,
|
||||
renc);
|
||||
if (ret)
|
||||
return ret;
|
||||
renc->output = output;
|
||||
|
||||
/*
|
||||
* Attach the bridge to the encoder. The bridge will create the
|
||||
|
|
Loading…
Reference in New Issue