Hello community,

here is the log from the commit of package hwinfo for openSUSE:Factory checked 
in at 2015-06-04 08:50:10
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/hwinfo (Old)
 and      /work/SRC/openSUSE:Factory/.hwinfo.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "hwinfo"

Changes:
--------
--- /work/SRC/openSUSE:Factory/hwinfo/hwinfo.changes    2015-03-03 
11:11:18.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.hwinfo.new/hwinfo.changes       2015-06-04 
08:50:11.000000000 +0200
@@ -1,0 +2,13 @@
+Wed Jun  3 10:11:00 CEST 2015 - snw...@suse.com
+
+- bugzilla for all this: bsc#913360
+- do not print anything to the console
+- Collect and print "Week of Manufacture" EDID data
+- increase monitor list size
+- refactor monitor detection
+- dump extra monitor data
+- initial support for detecting monitor via sysfs
+- Makefile - use /usr/lib64 by default on x86_64
+- 21.13
+
+-------------------------------------------------------------------

Old:
----
  hwinfo-21.12.tar.xz

New:
----
  hwinfo-21.13.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ hwinfo.spec ++++++
--- /var/tmp/diff_new_pack.RMu671/_old  2015-06-04 08:50:12.000000000 +0200
+++ /var/tmp/diff_new_pack.RMu671/_new  2015-06-04 08:50:12.000000000 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package hwinfo
 #
-# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -36,7 +36,7 @@
 Group:          Hardware/Other
 # Until migration to github this should be correct url
 Url:            http://gitorious.org/opensuse/hwinfo
-Version:        21.12
+Version:        21.13
 Release:        0
 Source:         %{name}-%{version}.tar.xz
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build

++++++ hwinfo-21.12.tar.xz -> hwinfo-21.13.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hwinfo-21.12/Makefile new/hwinfo-21.13/Makefile
--- old/hwinfo-21.12/Makefile   2015-02-27 10:26:03.000000000 +0100
+++ new/hwinfo-21.13/Makefile   2015-06-03 10:06:24.000000000 +0200
@@ -2,8 +2,6 @@
 SUBDIRS                = src
 TARGETS                = hwinfo hwinfo.pc changelog
 CLEANFILES     = hwinfo hwinfo.pc hwinfo.static hwscan hwscan.static hwscand 
hwscanqueue doc/libhd doc/*~
-LIBDIR         = /usr/lib
-ULIBDIR                = $(LIBDIR)
 LIBS           = -lhd
 SLIBS          = -lhd
 TLIBS          = -lhd_tiny
@@ -20,6 +18,13 @@
 
 include Makefile.common
 
+ifeq "$(ARCH)" "x86_64"
+LIBDIR         = /usr/lib64
+else
+LIBDIR         = /usr/lib
+endif
+ULIBDIR                = $(LIBDIR)
+
 # ia64
 ifneq ($(filter i386 x86_64, $(ARCH)),)
 SLIBS          += -lx86emu
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hwinfo-21.12/VERSION new/hwinfo-21.13/VERSION
--- old/hwinfo-21.12/VERSION    2015-02-27 10:26:03.000000000 +0100
+++ new/hwinfo-21.13/VERSION    2015-06-03 10:06:24.000000000 +0200
@@ -1 +1 @@
-21.12
+21.13
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hwinfo-21.12/changelog new/hwinfo-21.13/changelog
--- old/hwinfo-21.12/changelog  2015-02-27 10:26:03.000000000 +0100
+++ new/hwinfo-21.13/changelog  2015-06-03 10:06:24.000000000 +0200
@@ -1,3 +1,12 @@
+2015-06-03:    21.13
+       - do not print anything to the console
+       - Collect and print "Week of Manufacture" EDID data
+       - increase monitor list size
+       - refactor monitor detection
+       - dump extra monitor data
+       - initial support for detecting monitor via sysfs
+       - Makefile - use /usr/lib64 by default on x86_64
+
 2015-02-26:    21.12
        - Update aarch64 cpuinfo parser to handle post-3.19 format
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hwinfo-21.12/src/hd/drm.c 
new/hwinfo-21.13/src/hd/drm.c
--- old/hwinfo-21.12/src/hd/drm.c       1970-01-01 01:00:00.000000000 +0100
+++ new/hwinfo-21.13/src/hd/drm.c       2015-06-03 10:06:24.000000000 +0200
@@ -0,0 +1,14 @@
+
+
+#include <fcntl.h>
+
+#include "hd.h"
+#include "hd_int.h"
+
+int is_kms_active(hd_data_t *hd_data) {
+  int kms = open("/sys/class/drm/card0", O_RDONLY) > 0;
+  ADD2LOG("  KMS detected: %d\n", kms);
+
+  return kms; 
+}
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hwinfo-21.12/src/hd/drm.h 
new/hwinfo-21.13/src/hd/drm.h
--- old/hwinfo-21.12/src/hd/drm.h       1970-01-01 01:00:00.000000000 +0100
+++ new/hwinfo-21.13/src/hd/drm.h       2015-06-03 10:06:24.000000000 +0200
@@ -0,0 +1,8 @@
+
+#ifndef DRM_H
+#define DRM_H
+
+int is_kms_active(hd_data_t *hd_data);
+
+#endif /* DRM_H */
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hwinfo-21.12/src/hd/hd.c new/hwinfo-21.13/src/hd/hd.c
--- old/hwinfo-21.12/src/hd/hd.c        2015-02-27 10:26:03.000000000 +0100
+++ new/hwinfo-21.13/src/hd/hd.c        2015-06-03 10:06:24.000000000 +0200
@@ -92,6 +92,7 @@
 #include "wlan.h"
 #include "hal.h"
 #include "klog.h"
+#include "drm.h"
 
 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  * various functions commmon to all probing modules
@@ -661,12 +662,15 @@
       break;
 
     case hw_monitor:
-      hd_set_probe_feature(hd_data, pr_misc);
-      hd_set_probe_feature(hd_data, pr_prom);
+      /* if KMS is not active the data need to be read from BIOS */
+      if (!is_kms_active(hd_data)) {
+        hd_set_probe_feature(hd_data, pr_misc);
+        hd_set_probe_feature(hd_data, pr_prom);
+        hd_set_probe_feature(hd_data, pr_bios_ddc);
+        // hd_set_probe_feature(hd_data, pr_bios_fb);
+        hd_set_probe_feature(hd_data, pr_fb);
+      }
       hd_set_probe_feature(hd_data, pr_pci);
-      hd_set_probe_feature(hd_data, pr_bios_ddc);
-      // hd_set_probe_feature(hd_data, pr_bios_fb);
-      hd_set_probe_feature(hd_data, pr_fb);
       hd_set_probe_feature(hd_data, pr_monitor);
       break;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hwinfo-21.12/src/hd/hd.h new/hwinfo-21.13/src/hd/hd.h
--- old/hwinfo-21.12/src/hd/hd.h        2015-02-27 10:26:03.000000000 +0100
+++ new/hwinfo-21.13/src/hd/hd.h        2015-06-03 10:06:24.000000000 +0200
@@ -1048,8 +1048,8 @@
   char *sysfs_bus_id;                          /**< sysfs bus id */
   char *modalias;                              /**< module alias */
   char *label;                                 /**< Consistant Device Name 
(CDN), pci firmware spec 3.1, chapter 4.6.7 */
-  unsigned edid_len[4];                                /**< edid record length 
*/
-  unsigned char edid_data[4][0x80];            /**< edid record */
+  unsigned edid_len[6];                                /**< edid record length 
*/
+  unsigned char edid_data[6][0x80];            /**< edid record */
 } pci_t;
 
 /**
@@ -1408,6 +1408,7 @@
  */
 typedef struct {
   unsigned manu_year;
+  unsigned manu_week;
   unsigned min_vsync, max_vsync;       /**< vsync range */
   unsigned min_hsync, max_hsync;       /**< hsync range */
   unsigned clock;                      /**< pixel clock in kHz */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hwinfo-21.12/src/hd/hdp.c 
new/hwinfo-21.13/src/hd/hdp.c
--- old/hwinfo-21.12/src/hd/hdp.c       2015-02-27 10:26:03.000000000 +0100
+++ new/hwinfo-21.13/src/hd/hdp.c       2015-06-03 10:06:24.000000000 +0200
@@ -834,6 +834,14 @@
     for(i = 0, mdetail = &h->detail->monitor; mdetail; i++, mdetail = 
mdetail->next) {
       mi  = mdetail->data;
 
+      if (mi->manu_week == 255) {
+        dump_line("The Model Year: %d\n", mi->manu_year);
+      }
+      else {
+        dump_line("Year of Manufacture: %d\n", mi->manu_year);
+        dump_line("Week of Manufacture: %d\n", mi->manu_week);
+      }
+
       if(mi->htotal && mi->vtotal) {
         dump_line("Detailed Timings #%d:\n", i);
         dump_line("   Resolution: %ux%u\n", mi->width, mi->height);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hwinfo-21.12/src/hd/monitor.c 
new/hwinfo-21.13/src/hd/monitor.c
--- old/hwinfo-21.12/src/hd/monitor.c   2015-02-27 10:26:03.000000000 +0100
+++ new/hwinfo-21.13/src/hd/monitor.c   2015-06-03 10:06:24.000000000 +0200
@@ -11,6 +11,8 @@
  * @defgroup MONITORint Monitor (DDC) information
  * @ingroup libhdINFOint
  * @brief Monitor information functions
+ * @see 
http://en.wikipedia.org/wiki/Extended_Display_Identification_Data#EDID_1.3_data_format
+ *   for the detailed EDID data structure description
  *
  * @{
  */
@@ -308,7 +310,7 @@
   int i;
   unsigned u, u1, u2, tag;
   char *s;
-  unsigned width_mm = 0, height_mm = 0, manu_year = 0;
+  unsigned width_mm = 0, height_mm = 0, manu_year = 0, manu_week = 0;
   unsigned min_vsync = 0, max_vsync = 0, min_hsync = 0, max_hsync = 0;
   unsigned hblank, hsync_ofs, hsync, vblank, vsync_ofs, vsync;
   char *vendor = NULL, *serial = NULL, *name = NULL;
@@ -366,6 +368,7 @@
   }
 
   manu_year = 1990 + edid[0x11];
+  manu_week = edid[0x10];
 
   ADD2LOG("  detailed timings:\n");
 
@@ -439,6 +442,7 @@
           mi->width_mm = width_mm;
           mi->height_mm = height_mm;
           mi->manu_year = manu_year;
+          mi->manu_week = manu_week;
 
           u = (edid[i + 0] + (edid[i + 1] << 8)) * 10; /* pixel clock in kHz */
           if(!u) break;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hwinfo-21.12/src/hd/pci.c 
new/hwinfo-21.13/src/hd/pci.c
--- old/hwinfo-21.12/src/hd/pci.c       2015-02-27 10:26:03.000000000 +0100
+++ new/hwinfo-21.13/src/hd/pci.c       2015-06-03 10:06:24.000000000 +0200
@@ -60,6 +60,7 @@
 static void hd_read_virtio(hd_data_t *hd_data);
 static void hd_read_uisvirtpci(hd_data_t *hd_data);
 static void hd_read_ibmebus(hd_data_t *hd_data);
+static void add_edid_from_file(const char *file, pci_t *pci, int index, 
hd_data_t *hd_data);
 
 void hd_scan_sysfs_pci(hd_data_t *hd_data)
 {
@@ -128,9 +129,10 @@
   str_list_t *sl;
   char *s;
   pci_t *pci;
-  int fd, i;
-  str_list_t *sf_bus, *sf_bus_e;
-  char *sf_dev;
+  int fd;
+  str_list_t *sf_bus, *sf_bus_e, *sf_drm_dirs, *sf_drm_dir, *sf_drm_subdirs,
+    *sf_drm_subdir;
+  char *sf_dev, *sf_drm = NULL, *sf_drm_subpath = NULL, *sf_drm_edid = NULL;
 
   sf_bus = read_dir("/sys/bus/pci/devices", 'l');
 
@@ -269,32 +271,43 @@
       close(fd);
     }
 
+    /* FIXME: stil valid? */
     for(u = 0; u < sizeof pci->edid_len / sizeof *pci->edid_len; u++) {
       str_printf(&s, 0, "%s/edid%u", sf_dev, u + 1);
-      if((fd = open(s, O_RDONLY)) != -1) {
-        pci->edid_len[u] = read(fd, pci->edid_data[u], sizeof 
pci->edid_data[u]);
+      add_edid_from_file(s, pci, u, hd_data);
+    }
+    s = free_mem(s);
 
-        ADD2LOG("    edid%u[%u]\n", u + 1, pci->edid_len[u]);
+    /* try searching the monitor data in <PCI_dev>/drm/x/x/edid files if no 
data found*/
+    if (pci->edid_len[0] == 0) {
+      str_printf(&sf_drm, 0, "%s/drm", sf_dev);
+      u = 0;
+
+      /* get <PCI_dev>/drm/x listing */
+      sf_drm_dirs = read_dir(sf_drm, 'd');
+      for(sf_drm_dir = sf_drm_dirs; sf_drm_dir; sf_drm_dir = sf_drm_dir->next) 
{
+        str_printf(&sf_drm_subpath, 0, "%s/drm/%s", sf_dev, sf_drm_dir->str);
+
+        /* get <PCI_dev>/drm/x/x listing */
+        sf_drm_subdirs = read_dir(sf_drm_subpath, 'd');
+        for(sf_drm_subdir = sf_drm_subdirs; sf_drm_subdir; sf_drm_subdir = 
sf_drm_subdir->next) {
+          /* try loading <PCI_dev>/drm/x/x/edid file */
+          str_printf(&sf_drm_edid, 0, "%s/%s/edid", sf_drm_subpath, 
sf_drm_subdir->str);
+          add_edid_from_file(sf_drm_edid, pci, u, hd_data);
 
-        if(pci->edid_len[u] > 0) {
-          for(i = 0; i < sizeof pci->edid_data[u]; i += 0x10) {
-            ADD2LOG("      ");
-            hd_log_hex(hd_data, 1, 0x10, pci->edid_data[u] + i);
-            ADD2LOG("\n");
+          if (pci->edid_len[u] > 0) {
+            u = u + 1;
           }
         }
-        else {
-          pci->edid_len[u] = 0;
-        }
 
-        close(fd);
-      }
-      else {
-        pci->edid_len[u] = 0;
+        free_str_list(sf_drm_subdirs);
       }
-    }
 
-    s = free_mem(s);
+      sf_drm_subpath = free_mem(sf_drm_subpath);
+      sf_drm_edid = free_mem(sf_drm_edid);
+      sf_drm = free_mem(sf_drm);
+      free_str_list(sf_drm_dirs);
+    }
 
     pci->rev = pci->data[PCI_REVISION_ID];
 
@@ -312,6 +325,31 @@
   free_str_list(sf_bus);
 }
 
+void add_edid_from_file(const char *file, pci_t *pci, int index, hd_data_t 
*hd_data) {
+  int fd, i;
+
+  if((fd = open(file, O_RDONLY)) != -1) {
+    if (index < sizeof pci->edid_len / sizeof *pci->edid_len) {
+      pci->edid_len[index] = read(fd, pci->edid_data[index], sizeof 
pci->edid_data[index]);
+      ADD2LOG("    found edid file at %s (size: %d)\n", file, 
pci->edid_len[index]);
+
+      if(pci->edid_len[index] > 0) {
+        for(i = 0; i < sizeof pci->edid_data[index]; i += 0x10) {
+          ADD2LOG("      ");
+          hd_log_hex(hd_data, 1, 0x10, pci->edid_data[index] + i);
+          ADD2LOG("\n");
+        }
+      }
+    }
+    else {
+      ADD2LOG("    monitor list full, ignoring monitor data %s\n", file);
+    }
+    close(fd);
+  }
+  else {
+    pci->edid_len[index] = 0;
+  }
+}
 
 void add_pci_data(hd_data_t *hd_data)
 {


Reply via email to