From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yingjoe Chen Subject: Re: [PATCH v7 06/14] drm/mediatek: Add HDMI support Date: Tue, 29 Dec 2015 16:49:33 +0800 Message-ID: <1451378973.15546.3.camel@mtksdaap41> References: <1448917676-25584-1-git-send-email-p.zabel@pengutronix.de> <1448917676-25584-7-git-send-email-p.zabel@pengutronix.de> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1448917676-25584-7-git-send-email-p.zabel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Philipp Zabel Cc: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org, Mark Rutland , devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Paul Bolle , YT Shen , Jitao Shi , Jie Qiu , Pawel Moll , Ian Campbell , Cawa Cheng , Daniel Stone , Tomasz Figa , CK Hu , Rob Herring , linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, Daniel Vetter , Kumar Gala , Matthias Brugger , Dave Airlie , kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org List-Id: dri-devel@lists.freedesktop.org On Mon, 2015-11-30 at 22:07 +0100, Philipp Zabel wrote: > From: Jie Qiu > > This patch adds drivers for the HDMI bridge connected to the DPI0 > display subsystem function block, for the HDMI DDC block, and for > the HDMI PHY to support HDMI output. > > Signed-off-by: Jie Qiu > Signed-off-by: Philipp Zabel > --- <...> > +static int mtk_hdmi_setup_avi_infoframe(struct mtk_hdmi *hdmi, > + struct drm_display_mode *mode) > +{ > + struct hdmi_avi_infoframe frame; > + u8 buffer[17]; > + ssize_t err; > + > + err = drm_hdmi_avi_infoframe_from_display_mode(&frame, mode); > + if (err < 0) { > + dev_err(hdmi->dev, > + "Failed to get AVI infoframe from mode: %ld\n", err); Please use %zd instead for ssize_t, otherwise you'll see warning message when compile this on 32bits platform. Joe.C > + return err; > + } > + > + err = hdmi_avi_infoframe_pack(&frame, buffer, sizeof(buffer)); > + if (err < 0) { > + dev_err(hdmi->dev, "Failed to pack AVI infoframe: %ld\n", err); > + return err; > + } > + > + mtk_hdmi_hw_send_info_frame(hdmi, buffer, sizeof(buffer)); > + return 0; > +} > + -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html