Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions kernel/drivers/graphics/gfxfb.h
Original file line number Diff line number Diff line change
Expand Up @@ -258,18 +258,19 @@ class display {

/**
* @brief Place the hotspot of an output's cursor at (`x`, `y`) in the
* output's pixels, even off the output. A move before any picture only
* records the position, and the cursor stays hidden. The call may wait
* only for the display's own lock and for the hardware to take the
* position, within GFXFB_PRESENT_TIMEOUT_NS of giving it, never for a
* vertical blank or for its driver's task.
* output's pixels, even off the output. A move while the cursor is hidden,
* before any picture or after a hide, only records the position, and the
* cursor stays hidden. The call may wait only for the display's own lock
* and for the hardware to take the position, within
* GFXFB_PRESENT_TIMEOUT_NS of giving it, never for a vertical blank or for
* its driver's task.
* @param output Index of the output, below the count.
* @param x Column of the hotspot, negative left of the output.
* @param y Row of the hotspot, negative above the output.
* @return OK once the hardware was given the position or, before any
* picture, once the display recorded it. Otherwise the first that holds of
* ERR_UNSUPPORTED on an output without a hardware cursor, ERR_DEVICE once
* the hardware has failed, ERR_DARK when the output is not lit, and
* @return OK once the hardware was given the position or, while the cursor
* is hidden, once the display recorded it. Otherwise the first that holds
* of ERR_UNSUPPORTED on an output without a hardware cursor, ERR_DEVICE
* once the hardware has failed, ERR_DARK when the output is not lit, and
* ERR_REFUSED when the hardware refused the move.
*/
virtual int32_t move_cursor(uint32_t output, int32_t x, int32_t y) = 0;
Expand Down
10 changes: 5 additions & 5 deletions kernel/drivers/graphics/gfxfb_node.h
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,10 @@ class boot_display : public display {
* failing with `fs::ERR_BUSY` while another client controls the buffers or
* reserves control, then fails with `fs::ERR_IO` once the display has failed,
* and otherwise returns the display's result. The cursor calls for one output
* reach the display one at a time, never waiting for a present there. A
* closing client that controls the buffers hides each output's cursor before
* its control ends, unless the display has failed, and an output whose hide
* the display refuses keeps showing its cursor.
* reach the display one at a time, and gfxfb never makes one wait for a
* present there. A closing client that controls the buffers hides each
* output's cursor before its control ends, unless the display has failed, and
* an output whose hide the display refuses keeps showing its cursor.
*/
class gfxfb_node : public fs::node {
public:
Expand Down Expand Up @@ -323,7 +323,7 @@ class gfxfb_node : public fs::node {
uint32_t m_controller_calls = 0; // admitted calls of `m_controller` that have not ended

sync::mutex m_present_locks[GFXFB_OUTPUTS_MAX]; // so presents for one output reach the display one at a time
sync::mutex m_cursor_locks[GFXFB_OUTPUTS_MAX]; // likewise for cursor calls, which never wait for a present
sync::mutex m_cursor_locks[GFXFB_OUTPUTS_MAX]; // likewise for cursor calls, which never wait for a present lock
sync::spinlock m_outputs_lock; // over the members below, taken with interrupts disabled
output_records m_outputs[GFXFB_OUTPUTS_MAX]; // written unlocked only by `show()`, before the node is opened
bool m_display_failed = false; // set for good by a display call's ERR_DEVICE or a failed end
Expand Down
Loading
Loading