From: "Michel Dänzer" <michel@daenzer.net>
To: Oded Gabbay <oded.gabbay@gmail.com>
Cc: Maling list - DRI developers <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 2/3] radeon: Fix VCE ring test for Big-Endian systems
Date: Tue, 8 Dec 2015 12:00:21 +0900 [thread overview]
Message-ID: <566647C5.70504@daenzer.net> (raw)
In-Reply-To: <CAFCwf10JbkZA1e1+kN5TUqmEO4qP6=cYtPotgtCcmc9RV0khUw@mail.gmail.com>
On 08.12.2015 02:49, Oded Gabbay wrote:
> On Mon, Dec 7, 2015 at 9:51 AM, Michel Dänzer <michel@daenzer.net> wrote:
>> On 05.12.2015 06:09, Oded Gabbay wrote:
>>>
>>> @@ -765,7 +765,7 @@ int radeon_vce_ring_test(struct radeon_device *rdev, struct radeon_ring *ring)
>>> ring->idx, r);
>>> return r;
>>> }
>>> - radeon_ring_write(ring, VCE_CMD_END);
>>> + radeon_ring_write(ring, cpu_to_le32(VCE_CMD_END));
>>> radeon_ring_unlock_commit(rdev, ring, false);
>>>
>>> for (i = 0; i < rdev->usec_timeout; i++) {
>>>
>>
>> A new helper function such as
>>
>> static inline void radeon_ring_write_le(struct radeon_ring *ring, uint32_t v)
>> {
>> radeon_ring_write(ring, cpu_to_le32(v));
>> }
>>
>> might be nice for this.
>
> IMHO, I don't think this gives any benefit.
> You would just need to replace every:
>
> radeon_ring_write(ring, cpu_to_le32(SOME_DEFINE));
>
> with
>
> radeon_ring_write_le(ring, SOME_DEFINE);
>
> So no reduce in code size. Also, if you change it in my code, I think
> you need to change it in the entire driver for consistency.
>
> What's even more important, is that when I look at the above, it seems
> to me this change even makes the code *less* clear as you now need to
> go into radeon_ring_write_le to actually understand how the value is
> written.
Sprinkling cpu_to_le32 all over the place just seems a bit ugly to me,
but I don't feel strongly about it. I.e. I'm fine with the patch as is,
it was just a suggestion.
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Mesa and X developer
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2015-12-08 3:00 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-04 21:09 [PATCH 1/3] radeon/cik: Fix GFX IB test on Big-Endian Oded Gabbay
2015-12-04 21:09 ` [PATCH 2/3] radeon: Fix VCE ring test for Big-Endian systems Oded Gabbay
2015-12-07 7:51 ` Michel Dänzer
2015-12-07 17:49 ` Oded Gabbay
2015-12-08 3:00 ` Michel Dänzer [this message]
2015-12-09 10:20 ` Rafał Miłecki
2015-12-04 21:09 ` [PATCH 3/3] radeon: Fix VCE IB test on " Oded Gabbay
2015-12-05 10:23 ` [PATCH 1/3] radeon/cik: Fix GFX IB test on Big-Endian Christian König
2015-12-06 7:29 ` Oded Gabbay
2015-12-06 18:45 ` Christian König
2015-12-06 19:00 ` Oded Gabbay
2015-12-06 19:03 ` Christian König
2015-12-06 19:05 ` Oded Gabbay
2015-12-09 5:25 ` Alex Deucher
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=566647C5.70504@daenzer.net \
--to=michel@daenzer.net \
--cc=dri-devel@lists.freedesktop.org \
--cc=oded.gabbay@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox