search for: div_u64

Displaying 11 results from an estimated 11 matches for "div_u64".

Did you mean: div_s64
2023 Oct 30
1
[PATCH 2/2] nouveau/disp: fix post-gsp build on 32-bit arm.
...@@ -1644,7 +1644,7 @@ nv50_sor_dp_watermark_sst(struct nouveau_encoder *outp, // 0 active symbols. This may cause HW hang. Bug 200379426 // if ((bEnableDsc) && - ((pixelClockHz * depth) < ((8 * minRate * outp->dp.link_nr * DSC_FACTOR) / 64))) + ((pixelClockHz * depth) < div_u64(8 * minRate * outp->dp.link_nr * DSC_FACTOR, 64))) { return false; } @@ -1654,20 +1654,20 @@ nv50_sor_dp_watermark_sst(struct nouveau_encoder *outp, // For auto mode the watermark calculation does not need to track accumulated error the // formulas for manual mode will not work. So b...
2023 Oct 30
2
[PATCH 1/2] nouveau: fix r535 build on 32-bit arm.
...00644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/r535.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/r535.c @@ -267,7 +267,7 @@ r535_chan_id_get_locked(struct nvkm_chan *chan, struct nvkm_memory *muserd, u64 return -EINVAL; } - chid = ouserd / chan->func->userd->size; + chid = div_u64(ouserd, chan->func->userd->size); list_for_each_entry(userd, &fifo->userd.list, head) { if (userd->mem == muserd) { -- 2.41.0
2016 Sep 16
1
[PATCH] volt: use kernel's 64-bit signed division function
...info.mode) { /* 0x0 handled above! */ diff --git a/lib/include/nvif/os.h b/lib/include/nvif/os.h index b45a1862436e..2c1985d90474 100644 --- a/lib/include/nvif/os.h +++ b/lib/include/nvif/os.h @@ -88,6 +88,7 @@ typedef dma_addr_t resource_size_t; ) #define do_div(a,b) (a) = (a) / (b) #define div_u64(a,b) (a) / (b) +#define div64_s64(a,b) (a) / (b) #define likely(a) (a) #define unlikely(a) (a) #define BIT(a) (1UL << (a)) -- 2.9.3
2014 Dec 18
2
[RFC PATCH 2/3] dvfs: add support for GK20A
...et; > + > + ret = impl->get_dev_status(dvfs, &status); > + if (ret) { > + nv_warn(dvfs, "failed to get device status\n"); > + goto resched; > + } > + > + if (status.total) > + utilization = div_u64((u64)status.busy * 100, status.total); > + > + data->avg_load = (data->p_smooth * data->avg_load) + utilization; > + data->avg_load /= data->p_smooth + 1; > + nv_trace(dvfs, "utilization = %d %%, avg_load = %d %%\n", > +...
2014 Dec 18
3
[RFC PATCH 2/3] dvfs: add support for GK20A
...fs, &status); >>> + if (ret) { >>> + nv_warn(dvfs, "failed to get device status\n"); >>> + goto resched; >>> + } >>> + >>> + if (status.total) >>> + utilization = div_u64((u64)status.busy * 100, >>> status.total); >>> + >>> + data->avg_load = (data->p_smooth * data->avg_load) + utilization; >>> + data->avg_load /= data->p_smooth + 1; >>> + nv_trace(dvfs, "utilization = %d %%, avg_load...
2014 Dec 18
4
[RFC PATCH 0/3] introduce DVFS for GK20A
Hi, This is a try to have some simple DVFS (Dynamic Voltage and Frequency Scaling) support for GK20A. Instead of relying on other existing frequency scaling framework, we create a simple subdev in Nouveau for the same purpose. That's because we don't want to make the DVFS implementation for GK20A far more than enough in the beginning and hinder the implementation for dGPU in the future.
2014 Dec 18
0
[RFC PATCH 2/3] dvfs: add support for GK20A
...= (void *)object->oclass; + struct nouveau_dvfs_dev_status status; + u32 utilization = 0; + int state, ret; + + ret = impl->get_dev_status(dvfs, &status); + if (ret) { + nv_warn(dvfs, "failed to get device status\n"); + goto resched; + } + + if (status.total) + utilization = div_u64((u64)status.busy * 100, status.total); + + data->avg_load = (data->p_smooth * data->avg_load) + utilization; + data->avg_load /= data->p_smooth + 1; + nv_trace(dvfs, "utilization = %d %%, avg_load = %d %%\n", + utilization, data->avg_load); + + ret = impl->get_cur_s...
2014 Dec 18
0
[RFC PATCH 2/3] dvfs: add support for GK20A
...= impl->get_dev_status(dvfs, &status); >> + if (ret) { >> + nv_warn(dvfs, "failed to get device status\n"); >> + goto resched; >> + } >> + >> + if (status.total) >> + utilization = div_u64((u64)status.busy * 100, status.total); >> + >> + data->avg_load = (data->p_smooth * data->avg_load) + utilization; >> + data->avg_load /= data->p_smooth + 1; >> + nv_trace(dvfs, "utilization = %d %%, avg_load = %d %%\n", >> +...
2014 Dec 18
0
[RFC PATCH 2/3] dvfs: add support for GK20A
...t;> + if (ret) { >>>> + nv_warn(dvfs, "failed to get device status\n"); >>>> + goto resched; >>>> + } >>>> + >>>> + if (status.total) >>>> + utilization = div_u64((u64)status.busy * 100, >>>> status.total); >>>> + >>>> + data->avg_load = (data->p_smooth * data->avg_load) + utilization; >>>> + data->avg_load /= data->p_smooth + 1; >>>> + nv_trace(dvfs, "utilizati...
2014 Dec 22
7
[PATCH V2 1/4] clk: allow non-blocking for nouveau_clock_astate()
There might be some callers of nouveau_clock_astate(), and they are from inetrrupt context. So we must ensure that this function can be atomic in that condition. This patch adds one parameter which is subsequently passed to nouveau_pstate_calc(). Therefore we can choose whether we want to wait for the pstate work's completion or not. Signed-off-by: Vince Hsu <vinceh at nvidia.com> ---
2016 Dec 13
15
[PATCH v2 0/15] Falcon library
This was the first step of the secure boot refactoring - as Ben asked for some fixes, I now submit it as its own series to make it easier to review (and also because rebasing secure boot on top of this takes time and I don't want to do it until this is validated!). This series attempts to factorize the duplicate falcon-related code into a single library, using the existing nvkm_falcon