From 8d221c1d3dcf913d791d067a61770b6951c94e6c Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Mon, 12 Feb 2024 12:47:42 +0100 Subject: [PATCH] di-edid-decode: don't print manufacture week if unspecified Fixes philips-ftv-2017. Signed-off-by: Simon Ser --- di-edid-decode/edid.c | 4 +++- test/data/philips-ftv-2017.diff | 9 --------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/di-edid-decode/edid.c b/di-edid-decode/edid.c index 8492100..e46566e 100644 --- a/di-edid-decode/edid.c +++ b/di-edid-decode/edid.c @@ -793,10 +793,12 @@ print_edid(const struct di_edid *edid) } if (vendor_product->model_year != 0) { printf(" Model year: %d\n", vendor_product->model_year); - } else { + } else if (vendor_product->manufacture_week != 0) { printf(" Made in: week %d of %d\n", vendor_product->manufacture_week, vendor_product->manufacture_year); + } else { + printf(" Made in: %d\n", vendor_product->manufacture_year); } printf(" Basic Display Parameters & Features:\n"); diff --git a/test/data/philips-ftv-2017.diff b/test/data/philips-ftv-2017.diff index 341cee1..7775de2 100644 --- a/test/data/philips-ftv-2017.diff +++ b/test/data/philips-ftv-2017.diff @@ -1,14 +1,5 @@ --- ref +++ di -@@ -3,7 +3,7 @@ - Vendor & Product Identification: - Manufacturer: PHL - Model: 0 -- Made in: 2017 -+ Made in: week 0 of 2017 - Basic Display Parameters & Features: - Digital display - Image size is variable @@ -25,10 +25,10 @@ DMT 0x2a: 1400x1050 59.978442 Hz 4:3 65.317 kHz 121.750000 MHz DMT 0x3a: 1680x1050 59.954250 Hz 16:10 65.290 kHz 146.250000 MHz