RE: drm/amdgpu: implement cgs gpu memory callbacks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Original Message-----
> From: Dan Carpenter [mailto:dan.carpenter@xxxxxxxxxx]
> Sent: Tuesday, August 25, 2015 1:51 PM
> To: Zhou, David(ChunMing)
> Cc: dri-devel@xxxxxxxxxxxxxxxxxxxxx
> Subject: Re: drm/amdgpu: implement cgs gpu memory callbacks
> 
> On Tue, Aug 25, 2015 at 02:07:21AM +0000, Zhou, David(ChunMing) wrote:
> > >and can the shift actually
> > > wrap?
> > [DZ] of course, adding shift wrap is better. fpfn/lpfn is page number, so
> <<PAGE_SHIFT is to convert to memory size.
> 
> By "Shift wrap" I meant how you shift beyond the end of a 32bit number and it
> truncates, or if it's signed then it can wrap around (it's undefined actually, I
> probably should use a different word?).
> 
> int main(void)
> {
> 	unsigned long long a = 0xf0000000U << 12;
> 	unsigned long long b = 0xf0000000ULL << 12;
> 
> 	printf("%llx %llx\n", a, b);
> 
> 	return 0;
> }
[DZ] oh, I understand your mean, with previous PAGE_SHIFT, I think it should be like 'b' in your example without truncates.

Thanks,
 David Zhou
> 
> regards,
> dan carpenter
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux