Displaying 9 results from an estimated 9 matches for "div_round_up_ul".
Did you mean:
div_round_up_ull
2017 Jul 26
2
[PATCH] virtio_blk: fix incorrect message when disk is resized
...uot;, NULL };
+ unsigned long long nblocks;
u64 capacity;
/* Host must always specify the capacity. */
@@ -393,16 +394,19 @@ static void virtblk_config_changed_work(struct work_struct *work)
capacity = (sector_t)-1;
}
- string_get_size(capacity, queue_logical_block_size(q),
+ nblocks = DIV_ROUND_UP_ULL(capacity, queue_logical_block_size(q) >> 9);
+
+ string_get_size(nblocks, queue_logical_block_size(q),
STRING_UNITS_2, cap_str_2, sizeof(cap_str_2));
- string_get_size(capacity, queue_logical_block_size(q),
+ string_get_size(nblocks, queue_logical_block_size(q),
STRING_UNITS_10, cap_...
2017 Jul 26
2
[PATCH] virtio_blk: fix incorrect message when disk is resized
...uot;, NULL };
+ unsigned long long nblocks;
u64 capacity;
/* Host must always specify the capacity. */
@@ -393,16 +394,19 @@ static void virtblk_config_changed_work(struct work_struct *work)
capacity = (sector_t)-1;
}
- string_get_size(capacity, queue_logical_block_size(q),
+ nblocks = DIV_ROUND_UP_ULL(capacity, queue_logical_block_size(q) >> 9);
+
+ string_get_size(nblocks, queue_logical_block_size(q),
STRING_UNITS_2, cap_str_2, sizeof(cap_str_2));
- string_get_size(capacity, queue_logical_block_size(q),
+ string_get_size(nblocks, queue_logical_block_size(q),
STRING_UNITS_10, cap_...
2020 Feb 22
0
[PATCH 04/12] drm: Nuke mode->vrefresh
...mcde/mcde_dsi.c
> index bb6528b01cd0..6dca5344c0b3 100644
> --- a/drivers/gpu/drm/mcde/mcde_dsi.c
> +++ b/drivers/gpu/drm/mcde/mcde_dsi.c
> @@ -538,7 +538,7 @@ static void mcde_dsi_setup_video_mode(struct mcde_dsi *d,
> */
> /* (ps/s) / (pixels/s) = ps/pixels */
> pclk = DIV_ROUND_UP_ULL(1000000000000,
> - (mode->vrefresh * mode->htotal * mode->vtotal));
> + (drm_mode_vrefresh(mode) * mode->htotal * mode->vtotal));
> dev_dbg(d->dev, "picoseconds between two pixels: %llu\n",
> pclk);
>
This just caught my eye while browsing t...
2017 Aug 04
0
[PATCH] virtio_blk: fix incorrect message when disk is resized
...gt; u64 capacity;
>
> /* Host must always specify the capacity. */
> @@ -393,16 +394,19 @@ static void virtblk_config_changed_work(struct work_struct *work)
> capacity = (sector_t)-1;
> }
>
> - string_get_size(capacity, queue_logical_block_size(q),
> + nblocks = DIV_ROUND_UP_ULL(capacity, queue_logical_block_size(q) >> 9);
> +
> + string_get_size(nblocks, queue_logical_block_size(q),
> STRING_UNITS_2, cap_str_2, sizeof(cap_str_2));
> - string_get_size(capacity, queue_logical_block_size(q),
> + string_get_size(nblocks, queue_logical_block_size(q),...
2020 Apr 03
0
[PATCH v2 03/17] drm: Nuke mode->vrefresh
...mcde/mcde_dsi.c
> index 7af5ebb0c436..52031d826f2c 100644
> --- a/drivers/gpu/drm/mcde/mcde_dsi.c
> +++ b/drivers/gpu/drm/mcde/mcde_dsi.c
> @@ -538,7 +538,7 @@ static void mcde_dsi_setup_video_mode(struct mcde_dsi *d,
> */
> /* (ps/s) / (pixels/s) = ps/pixels */
> pclk = DIV_ROUND_UP_ULL(1000000000000,
> - (mode->vrefresh * mode->htotal * mode->vtotal));
> + (drm_mode_vrefresh(mode) * mode->htotal * mode->vtotal));
Shouldn't you just use the pixel clock here ?
Update: There's a patch further in this series that handles this, great
:-)
> d...
2020 Feb 19
5
[PATCH 04/12] drm: Nuke mode->vrefresh
.../mcde/mcde_dsi.c b/drivers/gpu/drm/mcde/mcde_dsi.c
index bb6528b01cd0..6dca5344c0b3 100644
--- a/drivers/gpu/drm/mcde/mcde_dsi.c
+++ b/drivers/gpu/drm/mcde/mcde_dsi.c
@@ -538,7 +538,7 @@ static void mcde_dsi_setup_video_mode(struct mcde_dsi *d,
*/
/* (ps/s) / (pixels/s) = ps/pixels */
pclk = DIV_ROUND_UP_ULL(1000000000000,
- (mode->vrefresh * mode->htotal * mode->vtotal));
+ (drm_mode_vrefresh(mode) * mode->htotal * mode->vtotal));
dev_dbg(d->dev, "picoseconds between two pixels: %llu\n",
pclk);
@@ -568,7 +568,7 @@ static void mcde_dsi_setup_video_mode(struct m...
2020 Apr 03
3
[PATCH v2 03/17] drm: Nuke mode->vrefresh
.../mcde/mcde_dsi.c b/drivers/gpu/drm/mcde/mcde_dsi.c
index 7af5ebb0c436..52031d826f2c 100644
--- a/drivers/gpu/drm/mcde/mcde_dsi.c
+++ b/drivers/gpu/drm/mcde/mcde_dsi.c
@@ -538,7 +538,7 @@ static void mcde_dsi_setup_video_mode(struct mcde_dsi *d,
*/
/* (ps/s) / (pixels/s) = ps/pixels */
pclk = DIV_ROUND_UP_ULL(1000000000000,
- (mode->vrefresh * mode->htotal * mode->vtotal));
+ (drm_mode_vrefresh(mode) * mode->htotal * mode->vtotal));
dev_dbg(d->dev, "picoseconds between two pixels: %llu\n",
pclk);
@@ -568,7 +568,7 @@ static void mcde_dsi_setup_video_mode(struct m...
2020 Apr 04
0
[PATCH v2 03/17] drm: Nuke mode->vrefresh
...cde_dsi.c
> index 7af5ebb0c436..52031d826f2c 100644
> --- a/drivers/gpu/drm/mcde/mcde_dsi.c
> +++ b/drivers/gpu/drm/mcde/mcde_dsi.c
> @@ -538,7 +538,7 @@ static void mcde_dsi_setup_video_mode(struct
> mcde_dsi *d,
> */
> /* (ps/s) / (pixels/s) = ps/pixels */
> pclk = DIV_ROUND_UP_ULL(1000000000000,
> - (mode->vrefresh * mode->htotal * mode->vtotal));
> + (drm_mode_vrefresh(mode) * mode->htotal * mode->vtotal));
> dev_dbg(d->dev, "picoseconds between two pixels: %llu\n",
> pclk);
>
> @@ -568,7 +568,7 @@ static void mcde_...
2020 Apr 28
0
[PATCH v3 03/16] drm: Nuke mode->vrefresh
.../mcde/mcde_dsi.c b/drivers/gpu/drm/mcde/mcde_dsi.c
index 1baa2324cdb9..8b693b206921 100644
--- a/drivers/gpu/drm/mcde/mcde_dsi.c
+++ b/drivers/gpu/drm/mcde/mcde_dsi.c
@@ -538,7 +538,7 @@ static void mcde_dsi_setup_video_mode(struct mcde_dsi *d,
*/
/* (ps/s) / (pixels/s) = ps/pixels */
pclk = DIV_ROUND_UP_ULL(1000000000000,
- (mode->vrefresh * mode->htotal * mode->vtotal));
+ (drm_mode_vrefresh(mode) * mode->htotal * mode->vtotal));
dev_dbg(d->dev, "picoseconds between two pixels: %llu\n",
pclk);
@@ -568,7 +568,7 @@ static void mcde_dsi_setup_video_mode(struct m...