History

drm/tinydrm: Fix setting of the column/page end addresses.

If the clipped dirty region's x/y happened to align to 256, we would have set the top 8 bits wrong. Noticed by inspection, not by reproducing a bug.

Eric Anholt committed 8 years ago

Commit 03ceb1c1 parent f300c861 file · +2 −2Browse files

Unified · Split

drivers/gpu/drm/tinydrm/mipi-dbi.c+2−2
@@ -240,10 +240,10 @@ static int mipi_dbi_fb_dirty(struct drm_framebuffer *fb, · 239 unmodified lines
240 240
241 mipi_dbi_command(mipi, MIPI_DCS_SET_COLUMN_ADDRESS,241 mipi_dbi_command(mipi, MIPI_DCS_SET_COLUMN_ADDRESS,
242 (clip.x1 >> 8) & 0xFF, clip.x1 & 0xFF,242 (clip.x1 >> 8) & 0xFF, clip.x1 & 0xFF,
243 (clip.x2 >> 8) & 0xFF, (clip.x2 - 1) & 0xFF);243 ((clip.x2 - 1) >> 8) & 0xFF, (clip.x2 - 1) & 0xFF);
244 mipi_dbi_command(mipi, MIPI_DCS_SET_PAGE_ADDRESS,244 mipi_dbi_command(mipi, MIPI_DCS_SET_PAGE_ADDRESS,
245 (clip.y1 >> 8) & 0xFF, clip.y1 & 0xFF,245 (clip.y1 >> 8) & 0xFF, clip.y1 & 0xFF,
246 (clip.y2 >> 8) & 0xFF, (clip.y2 - 1) & 0xFF);246 ((clip.y2 - 1) >> 8) & 0xFF, (clip.y2 - 1) & 0xFF);
247 247
248 ret = mipi_dbi_command_buf(mipi, MIPI_DCS_WRITE_MEMORY_START, tr,248 ret = mipi_dbi_command_buf(mipi, MIPI_DCS_WRITE_MEMORY_START, tr,
249 (clip.x2 - clip.x1) * (clip.y2 - clip.y1) * 2);249 (clip.x2 - clip.x1) * (clip.y2 - clip.y1) * 2);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t