Skip to contentSkip to conversation

tests/drmstat: remove the test

PATCH In review Emil Velikov 3 participants 10 messages Aug 29, 2013 – Aug 30, 2013 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/6 tests/drmstat: remove the test

Known broken and no longer of any use after the remove of drm procfs support from the kernel by

commit 151591c2828e18fde1eb8447874704f3422168b0

Author: Daniel Vetter <[email protected]>
Date:   Wed, 10 Jul 2013 09:46:12 +0000

drm: remove procfs code, take 2

---

That commit is not strictly in a released kernel yet, so one may prefer to delay this patch a bit.

 .gitignore        |   1 -
 tests/Makefile.am |   3 +-
 tests/drmstat.c   | 435 ------------------------------------------------------
 3 files changed, 1 insertion(+), 438 deletions(-)
 delete mode 100644 tests/drmstat.c
.gitignore +0 -1
index 5447f5c..ed288c4 100644
@@ -68,7 +68,6 @@ tdfx.kld
 via.kld
 tests/auth
 tests/dristat
-tests/drmstat
 tests/getclient
 tests/getstats
 tests/getversion
tests/Makefile.am +1 -2
index cd11491..1e70017 100644
@@ -7,8 +7,7 @@ AM_CPPFLAGS = \
 LDADD = $(top_builddir)/libdrm.la
 
 check_PROGRAMS = \
-	dristat \
-	drmstat
+	dristat
 
 SUBDIRS = modeprint
 
tests/drmstat.c deleted +0 -435

435 lines not on this page · raw message

Signature · 1 line
1.8.4
#2 lore raw

PATCH 2/6 tests/*version: add missing string.h header

In reply to a message not in the archive

Prodives memset() and strlen(), used in tests/setversion tests/getversion respectively.

---
 tests/getversion.c | 1 +
 tests/setversion.c | 1 +
 2 files changed, 2 insertions(+)
tests/getversion.c +1 -0
index 711d376..53d1d35 100644
@@ -25,6 +25,7 @@
  *
  */
 
+#include <string.h>
 #include "drmtest.h"
 
 /**
tests/setversion.c +1 -0
index 3aaf7cc..5a5d01c 100644
@@ -26,6 +26,7 @@
  */
 
 #include <limits.h>
+#include <string.h>
 #include "drmtest.h"
 
 /**
Signature · 1 line
1.8.4
Reviewed-by on v1 2/6
#3 lore raw

Re: [PATCH 2/6] tests/*version: add missing string.h header

Quoted 4 lines · Emil Velikov

Prodives memset() and strlen(), used in tests/setversion tests/getversion respectively.

Quoted 36 lines
---
 tests/getversion.c | 1 +
 tests/setversion.c | 1 +
 2 files changed, 2 insertions(+)
tests/getversion.c +1 -0
index 711d376..53d1d35 100644
@@ -25,6 +25,7 @@
  *
  */
 
+#include <string.h>
 #include "drmtest.h"
 
 /**
tests/setversion.c +1 -1
index 3aaf7cc..5a5d01c 100644
@@ -26,6 +26,7 @@
  */
 
 #include <limits.h>
+#include <string.h>
 #include "drmtest.h"
 
 /**
--

1.8.4

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#4 lore raw

PATCH 3/6 tests/modetest: silence compiler warning about uninitialised variables

In reply to a message not in the archive

The compiler is unaware of that we have at least one crts/connector/plane thus it complains that some of our variables will be used uninitialised.

---

This patch looks like a rather silly thing to do, although it seems like the only was to silence the gcc compiler

---
 tests/modetest/modetest.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
tests/modetest/modetest.c +3 -3
index f96b930..ed604b4 100644
@@ -781,7 +781,7 @@ static struct crtc *pipe_find_crtc(struct device *dev, struct pipe_arg *pipe)
 
 static int pipe_find_crtc_and_mode(struct device *dev, struct pipe_arg *pipe)
 {
-	drmModeModeInfo *mode;
+	drmModeModeInfo *mode = NULL;
 	int i;
 
 	pipe->mode = NULL;
@@ -838,8 +838,8 @@ struct property_arg {
 
 static void set_property(struct device *dev, struct property_arg *p)
 {
-	drmModeObjectProperties *props;
-	drmModePropertyRes **props_info;
+	drmModeObjectProperties *props = NULL;
+	drmModePropertyRes **props_info = NULL;
 	const char *obj_type;
 	int ret;
 	int i;
Signature · 1 line
1.8.4
Reviewed-by on v1 3/6
#5 lore raw

Re: [PATCH 3/6] tests/modetest: silence compiler warning about uninitialised variables

Quoted 4 lines · Emil Velikov

The compiler is unaware of that we have at least one crts/connector/plane thus it complains that some of our variables will be used uninitialised.

Quoted 39 lines

---

This patch looks like a rather silly thing to do, although it seems like the only was to silence the gcc compiler

---
 tests/modetest/modetest.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
tests/modetest/modetest.c +3 -4
index f96b930..ed604b4 100644
@@ -781,7 +781,7 @@ static struct crtc *pipe_find_crtc(struct device *dev, struct pipe_arg *pipe)
 
 static int pipe_find_crtc_and_mode(struct device *dev, struct pipe_arg *pipe)
 {
-       drmModeModeInfo *mode;
+       drmModeModeInfo *mode = NULL;
        int i;
 
        pipe->mode = NULL;
@@ -838,8 +838,8 @@ struct property_arg {
 
 static void set_property(struct device *dev, struct property_arg *p)
 {
-       drmModeObjectProperties *props;
-       drmModePropertyRes **props_info;
+       drmModeObjectProperties *props = NULL;
+       drmModePropertyRes **props_info = NULL;
        const char *obj_type;
        int ret;
        int i;
--

1.8.4

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#6 lore raw

PATCH 4/6 freedreno: use local drm.h over the system one

In reply to a message not in the archive

Otherwise build will fail, as drm/drm.h is not available.

---

Hello Rob,
I'm not entriely sure that this is correct as the libdrm code is splinckled with variations of drm/drm.h drm.h in both quoted and angle bracket form.

I believe that the chosen approach could be used througout libdrm although such a change would be quite evasive and may lead to a broken build.

This is what works for me, and looks approapriate IMHO

---
 freedreno/freedreno_priv.h | 2 +-
 freedreno/msm/msm_drm.h    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
freedreno/freedreno_priv.h +1 -1
index b10ac90..69256f5 100644
@@ -48,7 +48,7 @@
 
 #include "freedreno_drmif.h"
 #include "freedreno_ringbuffer.h"
-#include "drm/drm.h"
+#include "drm.h"
 
 struct fd_device_funcs {
 	int (*bo_new_handle)(struct fd_device *dev, uint32_t size,
freedreno/msm/msm_drm.h +1 -1
index d3c6207..090c724 100644
@@ -19,7 +19,7 @@
 #define __MSM_DRM_H__
 
 #include <stddef.h>
-#include <drm/drm.h>
+#include "drm.h"
 
 /* Please note that modifications to all structs defined here are
  * subject to backwards-compatibility constraints:
Signature · 1 line
1.8.4
#7 lore raw

PATCH 5/6 freedreno: set automake options to include subdir-objects

In reply to a message not in the archive

Handles automake complains about lack of forward-compatibility, due to the source files in the kgsl and msm backends/folders.

---

I'm suspecting that the warning is caused as Archlinux always keeps track with latest releases, whereas other distributions prefer to use a more tested software

automake 1.14
autoconf 2.69
---

 freedreno/Makefile.am | 2 ++
 1 file changed, 2 insertions(+)
freedreno/Makefile.am +2 -0
index ec7e359..7903e5b 100644
@@ -1,3 +1,5 @@
+AUTOMAKE_OPTIONS=subdir-objects
+
 AM_CFLAGS = \
 	$(WARN_CFLAGS) \
 	-I$(top_srcdir) \
Signature · 1 line
1.8.4
#8 lore raw

Re: [PATCH 5/6] freedreno: set automake options to include subdir-objects

Quoted 5 lines · Emil Velikov

Handles automake complains about lack of forward-compatibility, due to the source files in the kgsl and msm backends/folders.

I've tested these two (this and 4/6).. they seem to work fine for me, although I won't claim to be an automake guru, so couldn't actually tell you if they are the "right" fixes. I wouldn't mind a reviewed-by from someone who does know automake better, but if no one speaks up and says otherwise, I will apply/push them.

BR,
-R

Quoted 26 lines

---

I'm suspecting that the warning is caused as Archlinux always keeps track with latest releases, whereas other distributions prefer to use a more tested software

automake 1.14
autoconf 2.69
---

 freedreno/Makefile.am | 2 ++
 1 file changed, 2 insertions(+)
freedreno/Makefile.am +2 -1
index ec7e359..7903e5b 100644
@@ -1,3 +1,5 @@
+AUTOMAKE_OPTIONS=subdir-objects
+
 AM_CFLAGS = \
        $(WARN_CFLAGS) \
        -I$(top_srcdir) \
--

1.8.4

#9 lore raw

PATCH 6/6 intel: Update package name and description in libdrm_intel.pc

In reply to a message not in the archive

Currently the package name and description duplicate that of the core libdrm. Update those to reflect reality.

---

Trivial change IMHO, notices while checking the package Libs
---

 intel/libdrm_intel.pc.in | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
intel/libdrm_intel.pc.in +2 -2
index 3ba6793..670e4fe 100644
@@ -3,8 +3,8 @@ exec_prefix=@exec_prefix@
 libdir=@libdir@
 includedir=@includedir@
 
-Name: libdrm
-Description: Userspace interface to kernel DRM services
+Name: libdrm_intel
+Description: Userspace interface to intel kernel DRM services
 Version: @PACKAGE_VERSION@
 Requires: libdrm
 Libs: -L${libdir} -ldrm_intel
Signature · 1 line
1.8.4
Reviewed-by on v1 6/6
#10 lore raw

Re: [PATCH 6/6] intel: Update package name and description in libdrm_intel.pc

Quoted 5 lines · Emil Velikov

Currently the package name and description duplicate that of the core libdrm. Update those to reflect reality.

Looks good to me:

Signature · 1 line
Damien
Quoted 30 lines

---

Trivial change IMHO, notices while checking the package Libs
---

 intel/libdrm_intel.pc.in | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
intel/libdrm_intel.pc.in +2 -2
index 3ba6793..670e4fe 100644
@@ -3,8 +3,8 @@ exec_prefix=@exec_prefix@
 libdir=@libdir@
 includedir=@includedir@
 
-Name: libdrm
-Description: Userspace interface to kernel DRM services
+Name: libdrm_intel
+Description: Userspace interface to intel kernel DRM services
 Version: @PACKAGE_VERSION@
 Requires: libdrm
 Libs: -L${libdir} -ldrm_intel
Signature · 6 lines
1.8.4

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel