Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/nvidia no need for exact match on tmds mode, ju...
details: https://anonhg.NetBSD.org/src/rev/eada8420f535
branches: trunk
changeset: 339463:eada8420f535
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Thu Jul 23 15:43:06 2015 +0000
description:
no need for exact match on tmds mode, just use the closest match
diffstat:
sys/arch/arm/nvidia/tegra_hdmi.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r 37e1b5f7b7f2 -r eada8420f535 sys/arch/arm/nvidia/tegra_hdmi.c
--- a/sys/arch/arm/nvidia/tegra_hdmi.c Thu Jul 23 15:08:19 2015 +0000
+++ b/sys/arch/arm/nvidia/tegra_hdmi.c Thu Jul 23 15:43:06 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_hdmi.c,v 1.4 2015/07/23 14:31:05 jmcneill Exp $ */
+/* $NetBSD: tegra_hdmi.c,v 1.5 2015/07/23 15:43:06 jmcneill Exp $ */
/*-
* Copyright (c) 2015 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -29,7 +29,7 @@
#include "locators.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tegra_hdmi.c,v 1.4 2015/07/23 14:31:05 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tegra_hdmi.c,v 1.5 2015/07/23 15:43:06 jmcneill Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -252,11 +252,15 @@
tegra_car_hdmi_enable(mode->dot_clock * 1000);
for (n = 0; n < __arraycount(tegra_hdmi_tmds_config); n++) {
- if (tegra_hdmi_tmds_config[n].dot_clock == mode->dot_clock) {
- tmds = &tegra_hdmi_tmds_config[n];
+ if (tegra_hdmi_tmds_config[n].dot_clock >= mode->dot_clock) {
break;
}
}
+ if (n < __arraycount(tegra_hdmi_tmds_config)) {
+ tmds = &tegra_hdmi_tmds_config[n];
+ } else {
+ tmds = &tegra_hdmi_tmds_config[__arraycount(tegra_hdmi_tmds_config) - 1];
+ }
if (tmds != NULL) {
HDMI_WRITE(sc, HDMI_NV_PDISP_SOR_PLL0_REG, tmds->sor_pll0);
HDMI_WRITE(sc, HDMI_NV_PDISP_SOR_PLL1_REG, tmds->sor_pll1);
Home |
Main Index |
Thread Index |
Old Index