linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] OMAPDSS: fixes for rc
@ 2011-11-14 15:01 Tomi Valkeinen
  2011-11-14 15:01 ` [PATCH 1/3] OMAPDSS: HDMI: fix returned HDMI pixel clock Tomi Valkeinen
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Tomi Valkeinen @ 2011-11-14 15:01 UTC (permalink / raw)
  To: linux-fbdev, linux-omap; +Cc: archit, Tomi Valkeinen

A few fixes for the next -rc.

One for the old omapfb, and two for the omapdss fixing issues related to HDMI.

 Tomi

Tomi Valkeinen (3):
  OMAPDSS: HDMI: fix returned HDMI pixel clock
  OMAPFB: fix compilation warnings due to missing include
  OMAPDSS: DISPC: skip scaling calculations when not scaling

 drivers/video/omap/dispc.c      |    2 +-
 drivers/video/omap2/dss/dispc.c |   11 +++++------
 drivers/video/omap2/dss/hdmi.c  |    2 +-
 3 files changed, 7 insertions(+), 8 deletions(-)

-- 
1.7.4.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/3] OMAPDSS: HDMI: fix returned HDMI pixel clock
  2011-11-14 15:01 [PATCH 0/3] OMAPDSS: fixes for rc Tomi Valkeinen
@ 2011-11-14 15:01 ` Tomi Valkeinen
  2011-11-14 15:01 ` [PATCH 2/3] OMAPFB: fix compilation warnings due to missing include Tomi Valkeinen
  2011-11-14 15:01 ` [PATCH 3/3] OMAPDSS: DISPC: skip scaling calculations when not scaling Tomi Valkeinen
  2 siblings, 0 replies; 4+ messages in thread
From: Tomi Valkeinen @ 2011-11-14 15:01 UTC (permalink / raw)
  To: linux-fbdev, linux-omap; +Cc: archit, Tomi Valkeinen

hdmi_get_pixel_clock() returns the pixel clock in Hz, but the pck is
stored as kHz. This means the return value has to be multiplied by 1000,
not by 10000 as the code did.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/dss/hdmi.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c
index 3262f0f..c56378c 100644
--- a/drivers/video/omap2/dss/hdmi.c
+++ b/drivers/video/omap2/dss/hdmi.c
@@ -269,7 +269,7 @@ static void update_hdmi_timings(struct hdmi_config *cfg,
 unsigned long hdmi_get_pixel_clock(void)
 {
 	/* HDMI Pixel Clock in Mhz */
-	return hdmi.ip_data.cfg.timings.timings.pixel_clock * 10000;
+	return hdmi.ip_data.cfg.timings.timings.pixel_clock * 1000;
 }
 
 static void hdmi_compute_pll(struct omap_dss_device *dssdev, int phy,
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/3] OMAPFB: fix compilation warnings due to missing include
  2011-11-14 15:01 [PATCH 0/3] OMAPDSS: fixes for rc Tomi Valkeinen
  2011-11-14 15:01 ` [PATCH 1/3] OMAPDSS: HDMI: fix returned HDMI pixel clock Tomi Valkeinen
@ 2011-11-14 15:01 ` Tomi Valkeinen
  2011-11-14 15:01 ` [PATCH 3/3] OMAPDSS: DISPC: skip scaling calculations when not scaling Tomi Valkeinen
  2 siblings, 0 replies; 4+ messages in thread
From: Tomi Valkeinen @ 2011-11-14 15:01 UTC (permalink / raw)
  To: linux-fbdev, linux-omap; +Cc: archit, Tomi Valkeinen

Fix warnings similar to this by including module.h:

drivers/video/omap/dispc.c:276:1: warning: data definition has no type
or storage class
drivers/video/omap/dispc.c:276:1: warning: type defaults to 'int' in
declaration of 'EXPORT_SYMBOL'

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap/dispc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/video/omap/dispc.c b/drivers/video/omap/dispc.c
index 0ccd7ad..10f8bbe 100644
--- a/drivers/video/omap/dispc.c
+++ b/drivers/video/omap/dispc.c
@@ -18,7 +18,7 @@
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  */
-#include <linux/kernel.h>
+#include <linux/module.h>
 #include <linux/dma-mapping.h>
 #include <linux/mm.h>
 #include <linux/vmalloc.h>
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 3/3] OMAPDSS: DISPC: skip scaling calculations when not scaling
  2011-11-14 15:01 [PATCH 0/3] OMAPDSS: fixes for rc Tomi Valkeinen
  2011-11-14 15:01 ` [PATCH 1/3] OMAPDSS: HDMI: fix returned HDMI pixel clock Tomi Valkeinen
  2011-11-14 15:01 ` [PATCH 2/3] OMAPFB: fix compilation warnings due to missing include Tomi Valkeinen
@ 2011-11-14 15:01 ` Tomi Valkeinen
  2 siblings, 0 replies; 4+ messages in thread
From: Tomi Valkeinen @ 2011-11-14 15:01 UTC (permalink / raw)
  To: linux-fbdev, linux-omap; +Cc: archit, Tomi Valkeinen

Current code calculates scaling factors for video overlays even when the
overlays are not scaled. Change the code to skip calculations when not
scaling.

This optimizes the code a bit, but also fixes a problem when configuring
an overlay for a disabled display: if the display is disabled we don't
necessarily know the pixel clock used when the display is enabled, and
in some cases (like HDMI) the pixel clock is set to zero until a proper
video mode is set later. A wrong pixel clock will mess up the
scaling calculations, causing an error like:

omapdss DISPC error: failed to set up scaling, required fclk rate = 0
Hz, current fclk rate = 170666666 Hz

A proper fix would be to check later whether the clocks are enough for the
scaling, at the point when the overlay or display is actually enabled,
but this patch removes the problem for now.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/dss/dispc.c |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
index 3532782..5c81533 100644
--- a/drivers/video/omap2/dss/dispc.c
+++ b/drivers/video/omap2/dss/dispc.c
@@ -1720,12 +1720,11 @@ static int dispc_ovl_calc_scaling(enum omap_plane plane,
 	const int maxdownscale = dss_feat_get_param_max(FEAT_PARAM_DOWNSCALE);
 	unsigned long fclk = 0;
 
-	if ((ovl->caps & OMAP_DSS_OVL_CAP_SCALE) = 0) {
-		if (width != out_width || height != out_height)
-			return -EINVAL;
-		else
-			return 0;
-	}
+	if (width = out_width && height = out_height)
+		return 0;
+
+	if ((ovl->caps & OMAP_DSS_OVL_CAP_SCALE) = 0)
+		return -EINVAL;
 
 	if (out_width < width / maxdownscale ||
 			out_width > width * 8)
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-11-14 15:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-14 15:01 [PATCH 0/3] OMAPDSS: fixes for rc Tomi Valkeinen
2011-11-14 15:01 ` [PATCH 1/3] OMAPDSS: HDMI: fix returned HDMI pixel clock Tomi Valkeinen
2011-11-14 15:01 ` [PATCH 2/3] OMAPFB: fix compilation warnings due to missing include Tomi Valkeinen
2011-11-14 15:01 ` [PATCH 3/3] OMAPDSS: DISPC: skip scaling calculations when not scaling Tomi Valkeinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).