* [PATCH i-g-t] tools: print a warning for tools replaced by intel_reg
@ 2015-06-10 10:41 Thomas Wood
2015-06-15 15:51 ` Daniel Vetter
0 siblings, 1 reply; 5+ messages in thread
From: Thomas Wood @ 2015-06-10 10:41 UTC (permalink / raw)
To: intel-gfx; +Cc: Jani Nikula
Cc: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
---
tools/intel_iosf_sb_read.c | 3 +++
tools/intel_iosf_sb_write.c | 3 +++
tools/intel_reg_dumper.c | 3 +++
tools/intel_reg_read.c | 3 +++
tools/intel_reg_snapshot.c | 4 ++++
tools/intel_reg_write.c | 3 +++
tools/intel_vga_read.c | 3 +++
tools/intel_vga_write.c | 3 +++
8 files changed, 25 insertions(+)
diff --git a/tools/intel_iosf_sb_read.c b/tools/intel_iosf_sb_read.c
index f188cda..097b0b8 100644
--- a/tools/intel_iosf_sb_read.c
+++ b/tools/intel_iosf_sb_read.c
@@ -94,6 +94,9 @@ int main(int argc, char *argv[])
int i, nregs, count = 1, reg_stride;
const char *name;
+ fprintf(stderr, "WARNING: Use of %s has been deprecated and replaced by"
+ " intel_reg.\n", argv[0]);
+
if (!IS_VALLEYVIEW(dev->device_id) &&
!IS_CHERRYVIEW(dev->device_id)) {
usage(argv[0]);
diff --git a/tools/intel_iosf_sb_write.c b/tools/intel_iosf_sb_write.c
index eb6700d..a091a0d 100644
--- a/tools/intel_iosf_sb_write.c
+++ b/tools/intel_iosf_sb_write.c
@@ -89,6 +89,9 @@ int main(int argc, char** argv)
int i, nregs;
const char *name;
+ fprintf(stderr, "WARNING: Use of %s has been deprecated and replaced by"
+ " intel_reg.\n", argv[0]);
+
if (!IS_VALLEYVIEW(dev->device_id) &&
!IS_CHERRYVIEW(dev->device_id)) {
usage(argv[0]);
diff --git a/tools/intel_reg_dumper.c b/tools/intel_reg_dumper.c
index 3d32005..f9b4d06 100644
--- a/tools/intel_reg_dumper.c
+++ b/tools/intel_reg_dumper.c
@@ -2931,6 +2931,9 @@ int main(int argc, char** argv)
char *file = NULL, *reg_name = NULL;
uint32_t reg_val, power_well;
+ fprintf(stderr, "WARNING: Use of %s has been deprecated and replaced by"
+ " intel_reg.\n", argv[0]);
+
while ((opt = getopt(argc, argv, "d:h")) != -1) {
switch (opt) {
case 'd':
diff --git a/tools/intel_reg_read.c b/tools/intel_reg_read.c
index 46fa664..39671ff 100644
--- a/tools/intel_reg_read.c
+++ b/tools/intel_reg_read.c
@@ -74,6 +74,9 @@ int main(int argc, char** argv)
int decode_bits = 0;
int dwords = 1;
+ fprintf(stderr, "WARNING: Use of %s has been deprecated and replaced by"
+ " intel_reg.\n", argv[0]);
+
while ((ch = getopt(argc, argv, "dfhc:")) != -1) {
switch(ch) {
case 'd':
diff --git a/tools/intel_reg_snapshot.c b/tools/intel_reg_snapshot.c
index 50dafd6..8b097e6 100644
--- a/tools/intel_reg_snapshot.c
+++ b/tools/intel_reg_snapshot.c
@@ -26,6 +26,7 @@
#include <unistd.h>
#include <assert.h>
+#include <stdio.h>
#include "intel_io.h"
#include "intel_chipset.h"
@@ -36,6 +37,9 @@ int main(int argc, char** argv)
int mmio_bar;
int ret;
+ fprintf(stderr, "WARNING: Use of %s has been deprecated and replaced by"
+ " intel_reg.\n", argv[0]);
+
pci_dev = intel_get_pci_device();
devid = pci_dev->device_id;
intel_mmio_use_pci_bar(pci_dev);
diff --git a/tools/intel_reg_write.c b/tools/intel_reg_write.c
index b0ddffe..127519c 100644
--- a/tools/intel_reg_write.c
+++ b/tools/intel_reg_write.c
@@ -36,6 +36,9 @@ int main(int argc, char** argv)
{
uint32_t reg, value;
+ fprintf(stderr, "WARNING: Use of %s has been deprecated and replaced by"
+ " intel_reg.\n", argv[0]);
+
if (argc < 3) {
printf("Usage: %s addr value\n", argv[0]);
printf(" WARNING: This is dangerous to you and your system's health.\n");
diff --git a/tools/intel_vga_read.c b/tools/intel_vga_read.c
index ea50705..8305fb8 100644
--- a/tools/intel_vga_read.c
+++ b/tools/intel_vga_read.c
@@ -57,6 +57,9 @@ int main(int argc, char *argv[])
int i, ch;
const char *cmdname = argv[0];
+ fprintf(stderr, "WARNING: Use of %s has been deprecated and replaced by"
+ " intel_reg.\n", argv[0]);
+
while ((ch = getopt(argc, argv, "m")) != -1) {
switch(ch) {
case 'm':
diff --git a/tools/intel_vga_write.c b/tools/intel_vga_write.c
index 8215962..cb1ed98 100644
--- a/tools/intel_vga_write.c
+++ b/tools/intel_vga_write.c
@@ -57,6 +57,9 @@ int main(int argc, char *argv[])
int ch;
const char *cmdname = argv[0];
+ fprintf(stderr, "WARNING: Use of %s has been deprecated and replaced by"
+ " intel_reg.\n", argv[0]);
+
while ((ch = getopt(argc, argv, "m")) != -1) {
switch(ch) {
case 'm':
--
2.4.2
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH i-g-t] tools: print a warning for tools replaced by intel_reg
2015-06-10 10:41 [PATCH i-g-t] tools: print a warning for tools replaced by intel_reg Thomas Wood
@ 2015-06-15 15:51 ` Daniel Vetter
2015-06-15 15:51 ` Jani Nikula
0 siblings, 1 reply; 5+ messages in thread
From: Daniel Vetter @ 2015-06-15 15:51 UTC (permalink / raw)
To: Thomas Wood; +Cc: Jani Nikula, intel-gfx
On Wed, Jun 10, 2015 at 11:41:03AM +0100, Thomas Wood wrote:
> Cc: Jani Nikula <jani.nikula@intel.com>
> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
I'd go even one step further and do an exec using the corresponding
intel_reg commandline. On top of this patch ofc. Then we could nuke a lot
of the existing boilerplate already and then perhaps nuke all the tools
one release later on or so.
-Daniel
> ---
> tools/intel_iosf_sb_read.c | 3 +++
> tools/intel_iosf_sb_write.c | 3 +++
> tools/intel_reg_dumper.c | 3 +++
> tools/intel_reg_read.c | 3 +++
> tools/intel_reg_snapshot.c | 4 ++++
> tools/intel_reg_write.c | 3 +++
> tools/intel_vga_read.c | 3 +++
> tools/intel_vga_write.c | 3 +++
> 8 files changed, 25 insertions(+)
>
> diff --git a/tools/intel_iosf_sb_read.c b/tools/intel_iosf_sb_read.c
> index f188cda..097b0b8 100644
> --- a/tools/intel_iosf_sb_read.c
> +++ b/tools/intel_iosf_sb_read.c
> @@ -94,6 +94,9 @@ int main(int argc, char *argv[])
> int i, nregs, count = 1, reg_stride;
> const char *name;
>
> + fprintf(stderr, "WARNING: Use of %s has been deprecated and replaced by"
> + " intel_reg.\n", argv[0]);
> +
> if (!IS_VALLEYVIEW(dev->device_id) &&
> !IS_CHERRYVIEW(dev->device_id)) {
> usage(argv[0]);
> diff --git a/tools/intel_iosf_sb_write.c b/tools/intel_iosf_sb_write.c
> index eb6700d..a091a0d 100644
> --- a/tools/intel_iosf_sb_write.c
> +++ b/tools/intel_iosf_sb_write.c
> @@ -89,6 +89,9 @@ int main(int argc, char** argv)
> int i, nregs;
> const char *name;
>
> + fprintf(stderr, "WARNING: Use of %s has been deprecated and replaced by"
> + " intel_reg.\n", argv[0]);
> +
> if (!IS_VALLEYVIEW(dev->device_id) &&
> !IS_CHERRYVIEW(dev->device_id)) {
> usage(argv[0]);
> diff --git a/tools/intel_reg_dumper.c b/tools/intel_reg_dumper.c
> index 3d32005..f9b4d06 100644
> --- a/tools/intel_reg_dumper.c
> +++ b/tools/intel_reg_dumper.c
> @@ -2931,6 +2931,9 @@ int main(int argc, char** argv)
> char *file = NULL, *reg_name = NULL;
> uint32_t reg_val, power_well;
>
> + fprintf(stderr, "WARNING: Use of %s has been deprecated and replaced by"
> + " intel_reg.\n", argv[0]);
> +
> while ((opt = getopt(argc, argv, "d:h")) != -1) {
> switch (opt) {
> case 'd':
> diff --git a/tools/intel_reg_read.c b/tools/intel_reg_read.c
> index 46fa664..39671ff 100644
> --- a/tools/intel_reg_read.c
> +++ b/tools/intel_reg_read.c
> @@ -74,6 +74,9 @@ int main(int argc, char** argv)
> int decode_bits = 0;
> int dwords = 1;
>
> + fprintf(stderr, "WARNING: Use of %s has been deprecated and replaced by"
> + " intel_reg.\n", argv[0]);
> +
> while ((ch = getopt(argc, argv, "dfhc:")) != -1) {
> switch(ch) {
> case 'd':
> diff --git a/tools/intel_reg_snapshot.c b/tools/intel_reg_snapshot.c
> index 50dafd6..8b097e6 100644
> --- a/tools/intel_reg_snapshot.c
> +++ b/tools/intel_reg_snapshot.c
> @@ -26,6 +26,7 @@
>
> #include <unistd.h>
> #include <assert.h>
> +#include <stdio.h>
> #include "intel_io.h"
> #include "intel_chipset.h"
>
> @@ -36,6 +37,9 @@ int main(int argc, char** argv)
> int mmio_bar;
> int ret;
>
> + fprintf(stderr, "WARNING: Use of %s has been deprecated and replaced by"
> + " intel_reg.\n", argv[0]);
> +
> pci_dev = intel_get_pci_device();
> devid = pci_dev->device_id;
> intel_mmio_use_pci_bar(pci_dev);
> diff --git a/tools/intel_reg_write.c b/tools/intel_reg_write.c
> index b0ddffe..127519c 100644
> --- a/tools/intel_reg_write.c
> +++ b/tools/intel_reg_write.c
> @@ -36,6 +36,9 @@ int main(int argc, char** argv)
> {
> uint32_t reg, value;
>
> + fprintf(stderr, "WARNING: Use of %s has been deprecated and replaced by"
> + " intel_reg.\n", argv[0]);
> +
> if (argc < 3) {
> printf("Usage: %s addr value\n", argv[0]);
> printf(" WARNING: This is dangerous to you and your system's health.\n");
> diff --git a/tools/intel_vga_read.c b/tools/intel_vga_read.c
> index ea50705..8305fb8 100644
> --- a/tools/intel_vga_read.c
> +++ b/tools/intel_vga_read.c
> @@ -57,6 +57,9 @@ int main(int argc, char *argv[])
> int i, ch;
> const char *cmdname = argv[0];
>
> + fprintf(stderr, "WARNING: Use of %s has been deprecated and replaced by"
> + " intel_reg.\n", argv[0]);
> +
> while ((ch = getopt(argc, argv, "m")) != -1) {
> switch(ch) {
> case 'm':
> diff --git a/tools/intel_vga_write.c b/tools/intel_vga_write.c
> index 8215962..cb1ed98 100644
> --- a/tools/intel_vga_write.c
> +++ b/tools/intel_vga_write.c
> @@ -57,6 +57,9 @@ int main(int argc, char *argv[])
> int ch;
> const char *cmdname = argv[0];
>
> + fprintf(stderr, "WARNING: Use of %s has been deprecated and replaced by"
> + " intel_reg.\n", argv[0]);
> +
> while ((ch = getopt(argc, argv, "m")) != -1) {
> switch(ch) {
> case 'm':
> --
> 2.4.2
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH i-g-t] tools: print a warning for tools replaced by intel_reg
2015-06-15 15:51 ` Daniel Vetter
@ 2015-06-15 15:51 ` Jani Nikula
2015-06-15 15:58 ` Thomas Wood
0 siblings, 1 reply; 5+ messages in thread
From: Jani Nikula @ 2015-06-15 15:51 UTC (permalink / raw)
To: Daniel Vetter, Thomas Wood; +Cc: intel-gfx
On Mon, 15 Jun 2015, Daniel Vetter <daniel@ffwll.ch> wrote:
> On Wed, Jun 10, 2015 at 11:41:03AM +0100, Thomas Wood wrote:
>> Cc: Jani Nikula <jani.nikula@intel.com>
>> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
>
> I'd go even one step further and do an exec using the corresponding
> intel_reg commandline. On top of this patch ofc.
IMO more work than it's worth.
> Then we could nuke a lot of the existing boilerplate already and then
> perhaps nuke all the tools one release later on or so.
Hmm didn't we already make a release with the warnings? I'd just nuke
the deprecated ones from git now.
BR,
Jani.
> -Daniel
>
>> ---
>> tools/intel_iosf_sb_read.c | 3 +++
>> tools/intel_iosf_sb_write.c | 3 +++
>> tools/intel_reg_dumper.c | 3 +++
>> tools/intel_reg_read.c | 3 +++
>> tools/intel_reg_snapshot.c | 4 ++++
>> tools/intel_reg_write.c | 3 +++
>> tools/intel_vga_read.c | 3 +++
>> tools/intel_vga_write.c | 3 +++
>> 8 files changed, 25 insertions(+)
>>
>> diff --git a/tools/intel_iosf_sb_read.c b/tools/intel_iosf_sb_read.c
>> index f188cda..097b0b8 100644
>> --- a/tools/intel_iosf_sb_read.c
>> +++ b/tools/intel_iosf_sb_read.c
>> @@ -94,6 +94,9 @@ int main(int argc, char *argv[])
>> int i, nregs, count = 1, reg_stride;
>> const char *name;
>>
>> + fprintf(stderr, "WARNING: Use of %s has been deprecated and replaced by"
>> + " intel_reg.\n", argv[0]);
>> +
>> if (!IS_VALLEYVIEW(dev->device_id) &&
>> !IS_CHERRYVIEW(dev->device_id)) {
>> usage(argv[0]);
>> diff --git a/tools/intel_iosf_sb_write.c b/tools/intel_iosf_sb_write.c
>> index eb6700d..a091a0d 100644
>> --- a/tools/intel_iosf_sb_write.c
>> +++ b/tools/intel_iosf_sb_write.c
>> @@ -89,6 +89,9 @@ int main(int argc, char** argv)
>> int i, nregs;
>> const char *name;
>>
>> + fprintf(stderr, "WARNING: Use of %s has been deprecated and replaced by"
>> + " intel_reg.\n", argv[0]);
>> +
>> if (!IS_VALLEYVIEW(dev->device_id) &&
>> !IS_CHERRYVIEW(dev->device_id)) {
>> usage(argv[0]);
>> diff --git a/tools/intel_reg_dumper.c b/tools/intel_reg_dumper.c
>> index 3d32005..f9b4d06 100644
>> --- a/tools/intel_reg_dumper.c
>> +++ b/tools/intel_reg_dumper.c
>> @@ -2931,6 +2931,9 @@ int main(int argc, char** argv)
>> char *file = NULL, *reg_name = NULL;
>> uint32_t reg_val, power_well;
>>
>> + fprintf(stderr, "WARNING: Use of %s has been deprecated and replaced by"
>> + " intel_reg.\n", argv[0]);
>> +
>> while ((opt = getopt(argc, argv, "d:h")) != -1) {
>> switch (opt) {
>> case 'd':
>> diff --git a/tools/intel_reg_read.c b/tools/intel_reg_read.c
>> index 46fa664..39671ff 100644
>> --- a/tools/intel_reg_read.c
>> +++ b/tools/intel_reg_read.c
>> @@ -74,6 +74,9 @@ int main(int argc, char** argv)
>> int decode_bits = 0;
>> int dwords = 1;
>>
>> + fprintf(stderr, "WARNING: Use of %s has been deprecated and replaced by"
>> + " intel_reg.\n", argv[0]);
>> +
>> while ((ch = getopt(argc, argv, "dfhc:")) != -1) {
>> switch(ch) {
>> case 'd':
>> diff --git a/tools/intel_reg_snapshot.c b/tools/intel_reg_snapshot.c
>> index 50dafd6..8b097e6 100644
>> --- a/tools/intel_reg_snapshot.c
>> +++ b/tools/intel_reg_snapshot.c
>> @@ -26,6 +26,7 @@
>>
>> #include <unistd.h>
>> #include <assert.h>
>> +#include <stdio.h>
>> #include "intel_io.h"
>> #include "intel_chipset.h"
>>
>> @@ -36,6 +37,9 @@ int main(int argc, char** argv)
>> int mmio_bar;
>> int ret;
>>
>> + fprintf(stderr, "WARNING: Use of %s has been deprecated and replaced by"
>> + " intel_reg.\n", argv[0]);
>> +
>> pci_dev = intel_get_pci_device();
>> devid = pci_dev->device_id;
>> intel_mmio_use_pci_bar(pci_dev);
>> diff --git a/tools/intel_reg_write.c b/tools/intel_reg_write.c
>> index b0ddffe..127519c 100644
>> --- a/tools/intel_reg_write.c
>> +++ b/tools/intel_reg_write.c
>> @@ -36,6 +36,9 @@ int main(int argc, char** argv)
>> {
>> uint32_t reg, value;
>>
>> + fprintf(stderr, "WARNING: Use of %s has been deprecated and replaced by"
>> + " intel_reg.\n", argv[0]);
>> +
>> if (argc < 3) {
>> printf("Usage: %s addr value\n", argv[0]);
>> printf(" WARNING: This is dangerous to you and your system's health.\n");
>> diff --git a/tools/intel_vga_read.c b/tools/intel_vga_read.c
>> index ea50705..8305fb8 100644
>> --- a/tools/intel_vga_read.c
>> +++ b/tools/intel_vga_read.c
>> @@ -57,6 +57,9 @@ int main(int argc, char *argv[])
>> int i, ch;
>> const char *cmdname = argv[0];
>>
>> + fprintf(stderr, "WARNING: Use of %s has been deprecated and replaced by"
>> + " intel_reg.\n", argv[0]);
>> +
>> while ((ch = getopt(argc, argv, "m")) != -1) {
>> switch(ch) {
>> case 'm':
>> diff --git a/tools/intel_vga_write.c b/tools/intel_vga_write.c
>> index 8215962..cb1ed98 100644
>> --- a/tools/intel_vga_write.c
>> +++ b/tools/intel_vga_write.c
>> @@ -57,6 +57,9 @@ int main(int argc, char *argv[])
>> int ch;
>> const char *cmdname = argv[0];
>>
>> + fprintf(stderr, "WARNING: Use of %s has been deprecated and replaced by"
>> + " intel_reg.\n", argv[0]);
>> +
>> while ((ch = getopt(argc, argv, "m")) != -1) {
>> switch(ch) {
>> case 'm':
>> --
>> 2.4.2
>>
>> _______________________________________________
>> Intel-gfx mailing list
>> Intel-gfx@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH i-g-t] tools: print a warning for tools replaced by intel_reg
2015-06-15 15:51 ` Jani Nikula
@ 2015-06-15 15:58 ` Thomas Wood
2015-06-15 16:12 ` Daniel Vetter
0 siblings, 1 reply; 5+ messages in thread
From: Thomas Wood @ 2015-06-15 15:58 UTC (permalink / raw)
To: Jani Nikula; +Cc: Intel Graphics Development
On 15 June 2015 at 16:51, Jani Nikula <jani.nikula@intel.com> wrote:
> On Mon, 15 Jun 2015, Daniel Vetter <daniel@ffwll.ch> wrote:
>> On Wed, Jun 10, 2015 at 11:41:03AM +0100, Thomas Wood wrote:
>>> Cc: Jani Nikula <jani.nikula@intel.com>
>>> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
>>
>> I'd go even one step further and do an exec using the corresponding
>> intel_reg commandline. On top of this patch ofc.
>
> IMO more work than it's worth.
I looked at this, but the output and options of intel_reg don't quite
match those of tools it is replacing, so it's not an exact
replacement.
>
>> Then we could nuke a lot of the existing boilerplate already and then
>> perhaps nuke all the tools one release later on or so.
>
> Hmm didn't we already make a release with the warnings? I'd just nuke
> the deprecated ones from git now.
Yes, the 1.11 release has the warnings.
>
> BR,
> Jani.
>
>
>
>> -Daniel
>>
>>> ---
>>> tools/intel_iosf_sb_read.c | 3 +++
>>> tools/intel_iosf_sb_write.c | 3 +++
>>> tools/intel_reg_dumper.c | 3 +++
>>> tools/intel_reg_read.c | 3 +++
>>> tools/intel_reg_snapshot.c | 4 ++++
>>> tools/intel_reg_write.c | 3 +++
>>> tools/intel_vga_read.c | 3 +++
>>> tools/intel_vga_write.c | 3 +++
>>> 8 files changed, 25 insertions(+)
>>>
>>> diff --git a/tools/intel_iosf_sb_read.c b/tools/intel_iosf_sb_read.c
>>> index f188cda..097b0b8 100644
>>> --- a/tools/intel_iosf_sb_read.c
>>> +++ b/tools/intel_iosf_sb_read.c
>>> @@ -94,6 +94,9 @@ int main(int argc, char *argv[])
>>> int i, nregs, count = 1, reg_stride;
>>> const char *name;
>>>
>>> + fprintf(stderr, "WARNING: Use of %s has been deprecated and replaced by"
>>> + " intel_reg.\n", argv[0]);
>>> +
>>> if (!IS_VALLEYVIEW(dev->device_id) &&
>>> !IS_CHERRYVIEW(dev->device_id)) {
>>> usage(argv[0]);
>>> diff --git a/tools/intel_iosf_sb_write.c b/tools/intel_iosf_sb_write.c
>>> index eb6700d..a091a0d 100644
>>> --- a/tools/intel_iosf_sb_write.c
>>> +++ b/tools/intel_iosf_sb_write.c
>>> @@ -89,6 +89,9 @@ int main(int argc, char** argv)
>>> int i, nregs;
>>> const char *name;
>>>
>>> + fprintf(stderr, "WARNING: Use of %s has been deprecated and replaced by"
>>> + " intel_reg.\n", argv[0]);
>>> +
>>> if (!IS_VALLEYVIEW(dev->device_id) &&
>>> !IS_CHERRYVIEW(dev->device_id)) {
>>> usage(argv[0]);
>>> diff --git a/tools/intel_reg_dumper.c b/tools/intel_reg_dumper.c
>>> index 3d32005..f9b4d06 100644
>>> --- a/tools/intel_reg_dumper.c
>>> +++ b/tools/intel_reg_dumper.c
>>> @@ -2931,6 +2931,9 @@ int main(int argc, char** argv)
>>> char *file = NULL, *reg_name = NULL;
>>> uint32_t reg_val, power_well;
>>>
>>> + fprintf(stderr, "WARNING: Use of %s has been deprecated and replaced by"
>>> + " intel_reg.\n", argv[0]);
>>> +
>>> while ((opt = getopt(argc, argv, "d:h")) != -1) {
>>> switch (opt) {
>>> case 'd':
>>> diff --git a/tools/intel_reg_read.c b/tools/intel_reg_read.c
>>> index 46fa664..39671ff 100644
>>> --- a/tools/intel_reg_read.c
>>> +++ b/tools/intel_reg_read.c
>>> @@ -74,6 +74,9 @@ int main(int argc, char** argv)
>>> int decode_bits = 0;
>>> int dwords = 1;
>>>
>>> + fprintf(stderr, "WARNING: Use of %s has been deprecated and replaced by"
>>> + " intel_reg.\n", argv[0]);
>>> +
>>> while ((ch = getopt(argc, argv, "dfhc:")) != -1) {
>>> switch(ch) {
>>> case 'd':
>>> diff --git a/tools/intel_reg_snapshot.c b/tools/intel_reg_snapshot.c
>>> index 50dafd6..8b097e6 100644
>>> --- a/tools/intel_reg_snapshot.c
>>> +++ b/tools/intel_reg_snapshot.c
>>> @@ -26,6 +26,7 @@
>>>
>>> #include <unistd.h>
>>> #include <assert.h>
>>> +#include <stdio.h>
>>> #include "intel_io.h"
>>> #include "intel_chipset.h"
>>>
>>> @@ -36,6 +37,9 @@ int main(int argc, char** argv)
>>> int mmio_bar;
>>> int ret;
>>>
>>> + fprintf(stderr, "WARNING: Use of %s has been deprecated and replaced by"
>>> + " intel_reg.\n", argv[0]);
>>> +
>>> pci_dev = intel_get_pci_device();
>>> devid = pci_dev->device_id;
>>> intel_mmio_use_pci_bar(pci_dev);
>>> diff --git a/tools/intel_reg_write.c b/tools/intel_reg_write.c
>>> index b0ddffe..127519c 100644
>>> --- a/tools/intel_reg_write.c
>>> +++ b/tools/intel_reg_write.c
>>> @@ -36,6 +36,9 @@ int main(int argc, char** argv)
>>> {
>>> uint32_t reg, value;
>>>
>>> + fprintf(stderr, "WARNING: Use of %s has been deprecated and replaced by"
>>> + " intel_reg.\n", argv[0]);
>>> +
>>> if (argc < 3) {
>>> printf("Usage: %s addr value\n", argv[0]);
>>> printf(" WARNING: This is dangerous to you and your system's health.\n");
>>> diff --git a/tools/intel_vga_read.c b/tools/intel_vga_read.c
>>> index ea50705..8305fb8 100644
>>> --- a/tools/intel_vga_read.c
>>> +++ b/tools/intel_vga_read.c
>>> @@ -57,6 +57,9 @@ int main(int argc, char *argv[])
>>> int i, ch;
>>> const char *cmdname = argv[0];
>>>
>>> + fprintf(stderr, "WARNING: Use of %s has been deprecated and replaced by"
>>> + " intel_reg.\n", argv[0]);
>>> +
>>> while ((ch = getopt(argc, argv, "m")) != -1) {
>>> switch(ch) {
>>> case 'm':
>>> diff --git a/tools/intel_vga_write.c b/tools/intel_vga_write.c
>>> index 8215962..cb1ed98 100644
>>> --- a/tools/intel_vga_write.c
>>> +++ b/tools/intel_vga_write.c
>>> @@ -57,6 +57,9 @@ int main(int argc, char *argv[])
>>> int ch;
>>> const char *cmdname = argv[0];
>>>
>>> + fprintf(stderr, "WARNING: Use of %s has been deprecated and replaced by"
>>> + " intel_reg.\n", argv[0]);
>>> +
>>> while ((ch = getopt(argc, argv, "m")) != -1) {
>>> switch(ch) {
>>> case 'm':
>>> --
>>> 2.4.2
>>>
>>> _______________________________________________
>>> Intel-gfx mailing list
>>> Intel-gfx@lists.freedesktop.org
>>> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>>
>> --
>> Daniel Vetter
>> Software Engineer, Intel Corporation
>> http://blog.ffwll.ch
>
> --
> Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH i-g-t] tools: print a warning for tools replaced by intel_reg
2015-06-15 15:58 ` Thomas Wood
@ 2015-06-15 16:12 ` Daniel Vetter
0 siblings, 0 replies; 5+ messages in thread
From: Daniel Vetter @ 2015-06-15 16:12 UTC (permalink / raw)
To: Thomas Wood; +Cc: Jani Nikula, Intel Graphics Development
On Mon, Jun 15, 2015 at 04:58:51PM +0100, Thomas Wood wrote:
> On 15 June 2015 at 16:51, Jani Nikula <jani.nikula@intel.com> wrote:
> > On Mon, 15 Jun 2015, Daniel Vetter <daniel@ffwll.ch> wrote:
> >> On Wed, Jun 10, 2015 at 11:41:03AM +0100, Thomas Wood wrote:
> >>> Cc: Jani Nikula <jani.nikula@intel.com>
> >>> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
> >>
> >> I'd go even one step further and do an exec using the corresponding
> >> intel_reg commandline. On top of this patch ofc.
> >
> > IMO more work than it's worth.
>
> I looked at this, but the output and options of intel_reg don't quite
> match those of tools it is replacing, so it's not an exact
> replacement.
>
>
> >
> >> Then we could nuke a lot of the existing boilerplate already and then
> >> perhaps nuke all the tools one release later on or so.
> >
> > Hmm didn't we already make a release with the warnings? I'd just nuke
> > the deprecated ones from git now.
>
> Yes, the 1.11 release has the warnings.
Ah in that case let's just move ahead and nuke them all.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-06-15 16:09 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-10 10:41 [PATCH i-g-t] tools: print a warning for tools replaced by intel_reg Thomas Wood
2015-06-15 15:51 ` Daniel Vetter
2015-06-15 15:51 ` Jani Nikula
2015-06-15 15:58 ` Thomas Wood
2015-06-15 16:12 ` Daniel Vetter
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.