All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Deucher <alexdeucher@gmail.com>
To: Andre Heider <a.heider@gmail.com>
Cc: Alex Deucher <alexander.deucher@amd.com>,
	dri-devel@lists.freedesktop.org
Subject: Re: [pull] radeon drm-fixes-3.11
Date: Wed, 17 Jul 2013 16:36:32 -0400	[thread overview]
Message-ID: <CADnq5_MXhOg-i2DB4Et1=mX4W76oGSAWJWDDeis0LqMuXpqwng@mail.gmail.com> (raw)
In-Reply-To: <CAHsu+b_6nQENKc5Z3+fH=2MW1Bnm0G5mdGR7HP1YqqOi_Bzs4g@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1161 bytes --]

On Wed, Jul 17, 2013 at 4:24 PM, Andre Heider <a.heider@gmail.com> wrote:
> On Wed, Jul 17, 2013 at 9:54 PM,  <alexdeucher@gmail.com> wrote:
>> From: Alex Deucher <alexander.deucher@amd.com>
>>
>> Hi Dave,
>>
>> Just a few DPM fixes.
>>
>> The following changes since commit d1ce3d5496f2a7c90dd00a9133572f931d2acdcc:
>>
>>   uvesafb: Really allow mtrr being 0, as documented and warn()ed (2013-07-16 10:24:28 +1000)
>>
>> are available in the git repository at:
>>   git://people.freedesktop.org/~agd5f/linux drm-fixes-3.11
>>
>> Alex Deucher (3):
>>       drm/radeon: add a module parameter to disable aspm
>>       drm/radeon: fix an endian bug in atom table parsing
>>       drm/radeon/dpm: fix atom vram table parsing
>>
>> Andre Heider (1):
>>       drm/radeon/dpm/atom: restructure logic to work around a compiler bug
>
> Discarding the debug patches from bug #66932 and then merging your
> branch makes it break again :P
> Seems like the printk()s mattered and the gcc 4.8 still hates the code.
>
> I still think its due to the asRegIndexBuf[1] definition + accessing
> the array with i>0, let me poke at it a little

Does the attached patch help?

Alex

[-- Attachment #2: 0001-drm-radeon-dpm-atom-fix-broken-gcc-harder.patch --]
[-- Type: text/x-patch, Size: 1998 bytes --]

From f90555cbe629e14c6af1dcec1933a3833ecd321f Mon Sep 17 00:00:00 2001
From: Alex Deucher <alexander.deucher@amd.com>
Date: Wed, 17 Jul 2013 16:34:12 -0400
Subject: [PATCH] drm/radeon/dpm/atom: fix broken gcc harder

See bugs:
https://bugs.freedesktop.org/show_bug.cgi?id=66932
https://bugs.freedesktop.org/show_bug.cgi?id=66972
https://bugs.freedesktop.org/show_bug.cgi?id=66945

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/radeon/radeon_atombios.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c
index 2606ec6..e3f3e88 100644
--- a/drivers/gpu/drm/radeon/radeon_atombios.c
+++ b/drivers/gpu/drm/radeon/radeon_atombios.c
@@ -3699,18 +3699,21 @@ int radeon_atom_init_mc_reg_table(struct radeon_device *rdev,
 						(ATOM_MEMORY_SETTING_DATA_BLOCK *)
 						((u8 *)reg_block + (2 * sizeof(u16)) +
 						 le16_to_cpu(reg_block->usRegIndexTblSize));
+					ATOM_INIT_REG_INDEX_FORMAT *format = &reg_block->asRegIndexBuf[0];
 					num_entries = (u8)((le16_to_cpu(reg_block->usRegIndexTblSize)) /
 							   sizeof(ATOM_INIT_REG_INDEX_FORMAT)) - 1;
 					if (num_entries > VBIOS_MC_REGISTER_ARRAY_SIZE)
 						return -EINVAL;
 					while (i < num_entries) {
-						if (reg_block->asRegIndexBuf[i].ucPreRegDataLength & ACCESS_PLACEHOLDER)
+						if (format->ucPreRegDataLength & ACCESS_PLACEHOLDER)
 							break;
 						reg_table->mc_reg_address[i].s1 =
-							(u16)(le16_to_cpu(reg_block->asRegIndexBuf[i].usRegIndex));
+							(u16)(le16_to_cpu(format->usRegIndex));
 						reg_table->mc_reg_address[i].pre_reg_data =
-							(u8)(reg_block->asRegIndexBuf[i].ucPreRegDataLength);
+							(u8)(format->ucPreRegDataLength);
 						i++;
+						format = (ATOM_INIT_REG_INDEX_FORMAT *)
+							((u8 *)format + sizeof(ATOM_INIT_REG_INDEX_FORMAT));
 					}
 					reg_table->last = i;
 					while ((*(u32 *)reg_data != END_OF_REG_DATA_BLOCK) &&
-- 
1.7.7.5


[-- Attachment #3: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2013-07-17 20:36 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-17 19:54 [pull] radeon drm-fixes-3.11 alexdeucher
2013-07-17 20:24 ` Andre Heider
2013-07-17 20:26   ` Alex Deucher
2013-07-17 20:36   ` Alex Deucher [this message]
2013-07-17 21:05 ` alexdeucher
  -- strict thread matches above, loose matches on Subject: below --
2013-08-15 17:06 Alex Deucher
2013-08-14 22:11 Alex Deucher
2013-08-07 22:15 Alex Deucher
2013-08-08  4:37 ` Rafał Miłecki
2013-08-08 12:18   ` Deucher, Alexander
2013-07-29 22:39 alexdeucher
2013-07-30 21:38 ` alexdeucher
2013-07-23 12:37 alexdeucher
2013-07-26  2:05 ` alexdeucher
2013-07-15 20:42 alexdeucher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CADnq5_MXhOg-i2DB4Et1=mX4W76oGSAWJWDDeis0LqMuXpqwng@mail.gmail.com' \
    --to=alexdeucher@gmail.com \
    --cc=a.heider@gmail.com \
    --cc=alexander.deucher@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.