Message ID | 20190707181937.6250-10-laurent.pinchart@ideasonboard.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/omap: Replace custom display drivers with drm_bridge and drm_panel | expand |
On 07/07/2019 21:18, Laurent Pinchart wrote: > The drmP.h header is deprecated, replace it with the headers > specifically needed by the tfp410 driver. While at it, replace the DRM > print macros with dev_info() and dev_err() instead of including > drm_print.h > > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > --- > drivers/gpu/drm/bridge/ti-tfp410.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/bridge/ti-tfp410.c b/drivers/gpu/drm/bridge/ti-tfp410.c > index 8d4690e436c3..a1cad777b057 100644 > --- a/drivers/gpu/drm/bridge/ti-tfp410.c > +++ b/drivers/gpu/drm/bridge/ti-tfp410.c > @@ -18,6 +18,7 @@ > #include <linux/platform_device.h> > > #include <drm/drm_atomic_helper.h> > +#include <drm/drm_bridge.h> > #include <drm/drm_crtc.h> > #include <drm/drm_print.h> > #include <drm/drm_probe_helper.h> You're not actually removing drmP.h. So is the drm_bridge.h needed? Tomi
Hi Tomi, On Tue, Aug 27, 2019 at 09:38:18AM +0300, Tomi Valkeinen wrote: > On 07/07/2019 21:18, Laurent Pinchart wrote: > > The drmP.h header is deprecated, replace it with the headers > > specifically needed by the tfp410 driver. While at it, replace the DRM > > print macros with dev_info() and dev_err() instead of including > > drm_print.h > > > > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > > --- > > drivers/gpu/drm/bridge/ti-tfp410.c | 6 ++++-- > > 1 file changed, 4 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/gpu/drm/bridge/ti-tfp410.c b/drivers/gpu/drm/bridge/ti-tfp410.c > > index 8d4690e436c3..a1cad777b057 100644 > > --- a/drivers/gpu/drm/bridge/ti-tfp410.c > > +++ b/drivers/gpu/drm/bridge/ti-tfp410.c > > @@ -18,6 +18,7 @@ > > #include <linux/platform_device.h> > > > > #include <drm/drm_atomic_helper.h> > > +#include <drm/drm_bridge.h> > > #include <drm/drm_crtc.h> > > #include <drm/drm_print.h> > > #include <drm/drm_probe_helper.h> > > You're not actually removing drmP.h. So is the drm_bridge.h needed? A previous version of the patch did, and I didn't notice someone beat me to it :-) drm_bridge.h is needed but is included through drm_crtc.h. Note that Boris has submitted "[PATCH v2 01/21] drm: Stop including drm_bridge.h from drm_crtc.h" which will change this, and include drm_bridge.h explicitly in this driver, so I'll drop this patch.
diff --git a/drivers/gpu/drm/bridge/ti-tfp410.c b/drivers/gpu/drm/bridge/ti-tfp410.c index 8d4690e436c3..a1cad777b057 100644 --- a/drivers/gpu/drm/bridge/ti-tfp410.c +++ b/drivers/gpu/drm/bridge/ti-tfp410.c @@ -18,6 +18,7 @@ #include <linux/platform_device.h> #include <drm/drm_atomic_helper.h> +#include <drm/drm_bridge.h> #include <drm/drm_crtc.h> #include <drm/drm_print.h> #include <drm/drm_probe_helper.h> @@ -64,7 +65,8 @@ static int tfp410_get_modes(struct drm_connector *connector) edid = drm_get_edid(connector, dvi->ddc); if (!edid) { - DRM_INFO("EDID read failed. Fallback to standard modes\n"); + dev_info(dvi->dev, + "EDID read failed. Fallback to standard modes\n"); goto fallback; } @@ -365,7 +367,7 @@ static int tfp410_init(struct device *dev, bool i2c) IRQF_TRIGGER_FALLING | IRQF_ONESHOT, "hdmi-hpd", dvi); if (ret) { - DRM_ERROR("failed to register hpd interrupt\n"); + dev_err(dev, "failed to register hpd interrupt\n"); goto fail; } }
The drmP.h header is deprecated, replace it with the headers specifically needed by the tfp410 driver. While at it, replace the DRM print macros with dev_info() and dev_err() instead of including drm_print.h Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> --- drivers/gpu/drm/bridge/ti-tfp410.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)