Skip to content

Commit

Permalink
drm/meson: split out encoder from meson_dw_hdmi
Browse files Browse the repository at this point in the history
This moves all the non-DW-HDMI code where it should be:
an encoder in the drm/meson core driver.

The bridge functions are copied as-is, except:
- the encoder init uses the simple kms helper
- the mode_set has been moved to atomic_enable()
- debug prints are converted to dev_debg()

For now the bridge attach flags is 0, DRM_BRIDGE_ATTACH_NO_CONNECTOR
will be handled later.

The meson dw-hdmi glue is slightly fixed to live without the
encoder in the same driver.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
[narmstrong: fixed warning because missing meson_encoder_hdmi.h include]
Link: https://patchwork.freedesktop.org/patch/msgid/20211020123947.2585572-4-narmstrong@baylibre.com
  • Loading branch information
Neil Armstrong committed Nov 12, 2021
1 parent d235a7c commit e67f603
Show file tree
Hide file tree
Showing 5 changed files with 407 additions and 322 deletions.
1 change: 1 addition & 0 deletions drivers/gpu/drm/meson/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
meson-drm-y := meson_drv.o meson_plane.o meson_crtc.o meson_venc_cvbs.o
meson-drm-y += meson_viu.o meson_vpp.o meson_venc.o meson_vclk.o meson_overlay.o
meson-drm-y += meson_rdma.o meson_osd_afbcd.o
meson-drm-y += meson_encoder_hdmi.o

obj-$(CONFIG_DRM_MESON) += meson-drm.o
obj-$(CONFIG_DRM_MESON_DW_HDMI) += meson_dw_hdmi.o
5 changes: 5 additions & 0 deletions drivers/gpu/drm/meson/meson_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include "meson_osd_afbcd.h"
#include "meson_registers.h"
#include "meson_venc_cvbs.h"
#include "meson_encoder_hdmi.h"
#include "meson_viu.h"
#include "meson_vpp.h"
#include "meson_rdma.h"
Expand Down Expand Up @@ -318,6 +319,10 @@ static int meson_drv_bind_master(struct device *dev, bool has_components)
}
}

ret = meson_encoder_hdmi_init(priv);
if (ret)
goto free_drm;

ret = meson_plane_create(priv);
if (ret)
goto free_drm;
Expand Down
Loading

0 comments on commit e67f603

Please sign in to comment.