Re: [RFC,v2,1/8] video: tegra: Add nvhost driver

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

 



On 29.11.2012 11:10, Mark Zhang wrote:
>> +
>> +/**
>> + * Write a cpu syncpoint increment to the hardware, without touching
>> + * the cache. Caller is responsible for host being powered.
>> + */
>> +static void host1x_syncpt_cpu_incr(struct nvhost_syncpt *sp, u32 id)
>> +{
>> +     struct nvhost_master *dev = syncpt_to_dev(sp);
>> +     u32 reg_offset = id / 32;
>> +
>> +     if (!nvhost_module_powered(dev->dev)) {
>> +             dev_err(&syncpt_to_dev(sp)->dev->dev,
>> +                     "Trying to access host1x when it's off");
>> +             return;
>> +     }
>> +
>> +     if (!nvhost_syncpt_client_managed(sp, id)
>> +                     && nvhost_syncpt_min_eq_max(sp, id)) {
>> +             dev_err(&syncpt_to_dev(sp)->dev->dev,
>> +                     "Trying to increment syncpoint id %d beyond max\n",
>> +                     id);
>> +             return;
>> +     }
>> +     writel(BIT_MASK(id), dev->sync_aperture +
>> +                     host1x_sync_syncpt_cpu_incr_r() + reg_offset * 4);
> 
> I have a stupid question: According to the name and the context of this
> function, seems it increases the syncpt value which specified by param
> "id". So how does this "writel" increase the value? I don't know much
> about host1x/syncpt reg operations, so could you explain a little bit or
> I just completely have a wrong understanding?

I believe I've implemented most of the requests in this mail, but I seem
to have missed answering this question.

writel() to that register invokes a method in host1x, which increments
the sync point indicated by the value of the register by one.

Best regards,
Terje
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux