Re: Convert DRM_INFO/DRM_ERROR to dev_info/dev_err

2010-03-01 Thread Jerome Glisse
On Mon, Mar 01, 2010 at 03:47:35PM +1000, Dave Airlie wrote:
 On Fri, Feb 26, 2010 at 4:56 AM, Jerome Glisse gli...@freedesktop.org wrote:
  Attached is conversion from DRM_INFO/DRM_ERROR to dev_info/dev_err
  to apply it copy all doconv* file into the radeon subfolder of the
  kernel run ./doconv.sh and then apply the 0001 patch which fix
  compilation after conversion (place where struct radeon_device is
  missing) then thing should compile
 
  I think it's worthwhile cleanup especialy on multi GPU configuration.
 
 Does this not remove the drm log levels?
 
 so we end up with everything in dmesg the whole time?
 
 that seems wrong, I'd rather pass a dev to DRM_ERROR/DRM_INFO
 or maybe defined DRM_DEV_ERROR, DRM_DEV_INFO.
 
 Dave.


This doesn't touch DRM_DEBUG so log level is unaffected.
But if you prefer havimg DRM_DEV* i could convert radeon
to that.

Cheers,
Jerome

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


Re: Convert DRM_INFO/DRM_ERROR to dev_info/dev_err

2010-02-28 Thread Dave Airlie
On Fri, Feb 26, 2010 at 4:56 AM, Jerome Glisse gli...@freedesktop.org wrote:
 Attached is conversion from DRM_INFO/DRM_ERROR to dev_info/dev_err
 to apply it copy all doconv* file into the radeon subfolder of the
 kernel run ./doconv.sh and then apply the 0001 patch which fix
 compilation after conversion (place where struct radeon_device is
 missing) then thing should compile

 I think it's worthwhile cleanup especialy on multi GPU configuration.

Does this not remove the drm log levels?

so we end up with everything in dmesg the whole time?

that seems wrong, I'd rather pass a dev to DRM_ERROR/DRM_INFO
or maybe defined DRM_DEV_ERROR, DRM_DEV_INFO.

Dave.

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


Convert DRM_INFO/DRM_ERROR to dev_info/dev_err

2010-02-25 Thread Jerome Glisse
Attached is conversion from DRM_INFO/DRM_ERROR to dev_info/dev_err
to apply it copy all doconv* file into the radeon subfolder of the
kernel run ./doconv.sh and then apply the 0001 patch which fix
compilation after conversion (place where struct radeon_device is
missing) then thing should compile

I think it's worthwhile cleanup especialy on multi GPU configuration.

Cheers,
Jerome
From aafbeeeb2f706941d0dd5af92261cf6f9246bef6 Mon Sep 17 00:00:00 2001
From: Jerome Glisse jgli...@redhat.com
Date: Thu, 25 Feb 2010 19:39:03 +0100
Subject: [PATCH] FIX after DRM_* - dev_* conversion

---
 drivers/gpu/drm/radeon/atombios_crtc.c  |2 +-
 drivers/gpu/drm/radeon/atombios_dp.c|1 +
 drivers/gpu/drm/radeon/r100.c   |   14 +++---
 drivers/gpu/drm/radeon/r200.c   |1 +
 drivers/gpu/drm/radeon/r300.c   |3 +++
 drivers/gpu/drm/radeon/r600_audio.c |1 +
 drivers/gpu/drm/radeon/r600_cs.c|8 
 drivers/gpu/drm/radeon/radeon_connectors.c  |4 
 drivers/gpu/drm/radeon/radeon_cs.c  |2 ++
 drivers/gpu/drm/radeon/radeon_cursor.c  |1 +
 drivers/gpu/drm/radeon/radeon_device.c  |2 +-
 drivers/gpu/drm/radeon/radeon_display.c |   15 ++-
 drivers/gpu/drm/radeon/radeon_gem.c |2 ++
 drivers/gpu/drm/radeon/radeon_i2c.c |4 
 drivers/gpu/drm/radeon/radeon_kms.c |9 +
 drivers/gpu/drm/radeon/radeon_legacy_crtc.c |3 ++-
 drivers/gpu/drm/radeon/radeon_mode.h|3 ++-
 drivers/gpu/drm/radeon/radeon_ttm.c |2 ++
 18 files changed, 57 insertions(+), 20 deletions(-)

diff --git a/drivers/gpu/drm/radeon/atombios_crtc.c 
b/drivers/gpu/drm/radeon/atombios_crtc.c
index bf4d4df..e301a91 100644
--- a/drivers/gpu/drm/radeon/atombios_crtc.c
+++ b/drivers/gpu/drm/radeon/atombios_crtc.c
@@ -659,7 +659,7 @@ static void atombios_crtc_set_pll(struct drm_crtc *crtc, 
struct drm_display_mode
/* adjust pixel clock as needed */
adjusted_clock = atombios_adjust_pll(crtc, mode, pll);
 
-   radeon_compute_pll(pll, adjusted_clock, pll_clock, fb_div, 
frac_fb_div,
+   radeon_compute_pll(rdev, pll, adjusted_clock, pll_clock, fb_div, 
frac_fb_div,
   ref_div, post_div);
 
index = GetIndexIntoMasterTable(COMMAND, SetPixelClock);
diff --git a/drivers/gpu/drm/radeon/atombios_dp.c 
b/drivers/gpu/drm/radeon/atombios_dp.c
index ff3f043..16dc081 100644
--- a/drivers/gpu/drm/radeon/atombios_dp.c
+++ b/drivers/gpu/drm/radeon/atombios_dp.c
@@ -500,6 +500,7 @@ int radeon_dp_mode_valid_helper(struct radeon_connector 
*radeon_connector,
 static bool atom_dp_get_link_status(struct radeon_connector *radeon_connector,
u8 link_status[DP_LINK_STATUS_SIZE])
 {
+   struct radeon_device *rdev = radeon_connector-base.dev-dev_private;
int ret;
ret = radeon_dp_aux_native_read(radeon_connector, DP_LANE0_1_STATUS, 
100,
DP_LINK_STATUS_SIZE, link_status);
diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c
index 10d1518..932ce24 100644
--- a/drivers/gpu/drm/radeon/r100.c
+++ b/drivers/gpu/drm/radeon/r100.c
@@ -872,6 +872,7 @@ int r100_cs_parse_packet0(struct radeon_cs_parser *p,
 void r100_cs_dump_packet(struct radeon_cs_parser *p,
 struct radeon_cs_packet *pkt)
 {
+   struct radeon_device *rdev = p-rdev;
volatile uint32_t *ib;
unsigned i;
unsigned idx;
@@ -895,6 +896,7 @@ int r100_cs_packet_parse(struct radeon_cs_parser *p,
 struct radeon_cs_packet *pkt,
 unsigned idx)
 {
+   struct radeon_device *rdev = p-rdev;
struct radeon_cs_chunk *ib_chunk = p-chunks[p-chunk_ib_idx];
uint32_t header;
 
@@ -946,6 +948,7 @@ int r100_cs_packet_parse(struct radeon_cs_parser *p,
  */
 int r100_cs_packet_parse_vline(struct radeon_cs_parser *p)
 {
+   struct radeon_device *rdev = p-rdev;
struct drm_mode_object *obj;
struct drm_crtc *crtc;
struct radeon_crtc *radeon_crtc;
@@ -1040,6 +1043,7 @@ out:
 int r100_cs_packet_next_reloc(struct radeon_cs_parser *p,
  struct radeon_cs_reloc **cs_reloc)
 {
+   struct radeon_device *rdev = p-rdev;
struct radeon_cs_chunk *relocs_chunk;
struct radeon_cs_packet p3reloc;
unsigned idx;
@@ -1131,6 +1135,7 @@ static int r100_packet0_check(struct radeon_cs_parser *p,
  struct radeon_cs_packet *pkt,
  unsigned idx, unsigned reg)
 {
+   struct radeon_device *rdev = p-rdev;
struct radeon_cs_reloc *reloc;
struct r100_cs_track *track;
volatile uint32_t *ib;
@@ -1439,6 +1444,7 @@ int r100_cs_track_check_pkt3_indx_buffer(struct 
radeon_cs_parser *p,
 struct radeon_cs_packet