Age | Commit message (Collapse) | Author | Files | Lines |
|
Signed-off-by: Ben Crocker <bcrocker@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: Dave Airlie <airlied@gmail.com>
|
|
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: Dave Airlie <airlied@gmail.com>
|
|
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@gmail.com>
|
|
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@gmail.com>
|
|
CIK parts use a different PCI BAR for registers.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@gmail.com>
|
|
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Dave Airlie <airlied@gmail.com>
|
|
|
|
Tested on HD7750.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
They don't exist on DCE6+
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@gmail.com>
|
|
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@gmail.com>
|
|
|
|
Every HDMI block is longer by at least 4 more registers. For example
0x7d28 on HD6320 contains buffer status.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
"radeontool --help" tries to map the control region in order to print
dac and light state indicators embedded in the usage message.
Unfortunately that means that running "radeontool --help" without
sufficient privileges errors out without a usage message that would
have hinted at what the tool is for and why it needs root.
fatal error: cannot map ctrl region: Permission denied
It would be more helpful to write
error: cannot map ctrl region: Permission denied
usage: radeontool [options] [command]
followed by a usage message without the dac and light indicators.
Based on a patch by Tormod Volden.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
Add assertions to all functions that assume the caller has called
map_radeon_cntl_mem and radeon_cntl_mem is non-NULL. Use assert()
uniformly for this, replacing the more verbose
if (!radeon_cntl_mem)
die("internal error");
since assert() tends to produce more useful output that precisely
pinpoints the call site.
The intent is to document the current assumptions before breaking
them by changing map_radeon_cntl() to sometimes leave radeon_cntl_mem
equal to NULL (for example, when no Radeon is present).
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
Introduce a die_error() helper that includes strerror in a fatal error
message and use it where possible. In particular, when running
radeontool as non-root, instead of the cryptic
fatal error: mapping ctrl region
the operator will get a more helpful diagnosis:
fatal error: cannot map ctrl region: Permission denied
Inspired by a patch by Tormod Volden.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
Ever since it was introduced in libpciaccess 0.10.0 four years ago,
pci_device_map_range has been the preferred way to map a PCI region
and pci_device_map_region has been a deprecated backward-compatibility
shim. Switch over. No functional change intended.
Noticed by gcc -Wdeprecated-declarations.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
Trying to guess which region is which based on size is needlessly
error-prone and complicated.
Region 0 is always the frame buffer and region 2 is always mmio.
radeonreg already hard-codes the appropriate region numbers. This
patch teaches radeontool and avivotool to do the same.
Suggested-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
This just unindents the code some more.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
If only one card is present but --skip=n was supplied, it is more
intuitive to error out than to guess which earlier card the user
meant.
Compare commit a8ce2f23c589 (radeontool: completely skip early cards
with --skip, 2010-03-23).
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
In the construct
for each PCI device:
if PCI ID is interesting:
long block of code to handle
the detected device
the "if" with long body leaves the reader in suspense about what will
happen when the PCI ID is not interesting. Rewriting as
for each PCI device:
if PCI ID is uninteresting:
continue
handle the detected device
deals with the easy case right away and decreases nesting for the bulk
of the "while" loop body as a nice side effect. No change in
functionality intended.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
It's safer not to continue once in an erroneous situation.
This reverses a change made in radeontool-1.6.0~28 ("add more ram
dumping stuff") and makes the behavior of avivotool match radeontool
again.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
After radeontool-1.6.0~28 ("add more ram dumping stuff") avivotool
tries to detect a Radeon unconditionally, even for the romtables
subcommand that doesn't require one. To keep avivotool useful when
there is an error detecting a card, the patch changed the fatal error
codepath to keep going rather than exiting.
That had some unpleasant side effects, so make lack of a card and
other card detection trouble into non-fatal errors as preparation for
making die() exit again.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
This is more robust: if a caller forgets the final newline, the
resulting messages that run together can be hard to read, whereas if a
caller adds an extra newline, it just means an extra blank line in the
output.
Rename the function when changing the interface so any callers that
have not been adjusted will break the build. No change in
functionality intended.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
Let the user know which message corresponds to the error that
caused the tool to exit.
[jn: using "fatal error:" instead of "Error:" for consistency with
"usage:"]
Signed-off-by: Tormod Volden <lists.tormod@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
$ >test
$ radeontool romtables test
$ PCI ROM signature 0x55 0xaa missing$
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
fatal() is never called with a user-specified argument so it is safe
to pass its argument as an fprintf format string, but gcc doesn't know
that. Use fprintf(stderr, "%s", arg) to make the intent clearer.
This fixes the build in distro setups that pass -Werror=format-security.
Based on the patch by Tormod.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
using tables from rv100 on js22 machine, not sure what 0xa op in init2 table is
these tables are found in the open firmware device tree,
/proc/device-tree/pci@800000020000202/display@1/ on the js22
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
|
|
|
|
detect the chip family and dump appropriately.
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
simple reg dumper for different families.
radeonreg regs <set>
<set>
radeon - r128, r1xx-r4xx
avivo - r5xx, rs600/690/740, r600, rv610/630/670
dce3 - rv620/635/770/710/730/740, rs780/880
dce4 - evergreen
dce5 - ni
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
|
|
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|