| .. | .. |
|---|
| 25 | 25 | * |
|---|
| 26 | 26 | **************************************************************************/ |
|---|
| 27 | 27 | |
|---|
| 28 | | - |
|---|
| 29 | | -#include <drm/drmP.h> |
|---|
| 30 | | -#include "vmwgfx_drv.h" |
|---|
| 31 | | - |
|---|
| 32 | 28 | #include <drm/ttm/ttm_placement.h> |
|---|
| 33 | 29 | |
|---|
| 34 | 30 | #include "device_include/svga_overlay.h" |
|---|
| 35 | 31 | #include "device_include/svga_escape.h" |
|---|
| 32 | + |
|---|
| 33 | +#include "vmwgfx_drv.h" |
|---|
| 36 | 34 | |
|---|
| 37 | 35 | #define VMW_MAX_NUM_STREAMS 1 |
|---|
| 38 | 36 | #define VMW_OVERLAY_CAP_MASK (SVGA_FIFO_CAP_VIDEO | SVGA_FIFO_CAP_ESCAPE) |
|---|
| .. | .. |
|---|
| 124 | 122 | |
|---|
| 125 | 123 | fifo_size = sizeof(*cmds) + sizeof(*flush) + sizeof(*items) * num_items; |
|---|
| 126 | 124 | |
|---|
| 127 | | - cmds = vmw_fifo_reserve(dev_priv, fifo_size); |
|---|
| 125 | + cmds = VMW_FIFO_RESERVE(dev_priv, fifo_size); |
|---|
| 128 | 126 | /* hardware has hung, can't do anything here */ |
|---|
| 129 | 127 | if (!cmds) |
|---|
| 130 | 128 | return -ENOMEM; |
|---|
| .. | .. |
|---|
| 194 | 192 | int ret; |
|---|
| 195 | 193 | |
|---|
| 196 | 194 | for (;;) { |
|---|
| 197 | | - cmds = vmw_fifo_reserve(dev_priv, sizeof(*cmds)); |
|---|
| 195 | + cmds = VMW_FIFO_RESERVE(dev_priv, sizeof(*cmds)); |
|---|
| 198 | 196 | if (cmds) |
|---|
| 199 | 197 | break; |
|---|
| 200 | 198 | |
|---|
| .. | .. |
|---|
| 351 | 349 | stream->saved = *arg; |
|---|
| 352 | 350 | /* stream is no longer stopped/paused */ |
|---|
| 353 | 351 | stream->paused = false; |
|---|
| 354 | | - |
|---|
| 355 | | - return 0; |
|---|
| 356 | | -} |
|---|
| 357 | | - |
|---|
| 358 | | -/** |
|---|
| 359 | | - * Stop all streams. |
|---|
| 360 | | - * |
|---|
| 361 | | - * Used by the fb code when starting. |
|---|
| 362 | | - * |
|---|
| 363 | | - * Takes the overlay lock. |
|---|
| 364 | | - */ |
|---|
| 365 | | -int vmw_overlay_stop_all(struct vmw_private *dev_priv) |
|---|
| 366 | | -{ |
|---|
| 367 | | - struct vmw_overlay *overlay = dev_priv->overlay_priv; |
|---|
| 368 | | - int i, ret; |
|---|
| 369 | | - |
|---|
| 370 | | - if (!overlay) |
|---|
| 371 | | - return 0; |
|---|
| 372 | | - |
|---|
| 373 | | - mutex_lock(&overlay->mutex); |
|---|
| 374 | | - |
|---|
| 375 | | - for (i = 0; i < VMW_MAX_NUM_STREAMS; i++) { |
|---|
| 376 | | - struct vmw_stream *stream = &overlay->stream[i]; |
|---|
| 377 | | - if (!stream->buf) |
|---|
| 378 | | - continue; |
|---|
| 379 | | - |
|---|
| 380 | | - ret = vmw_overlay_stop(dev_priv, i, false, false); |
|---|
| 381 | | - WARN_ON(ret != 0); |
|---|
| 382 | | - } |
|---|
| 383 | | - |
|---|
| 384 | | - mutex_unlock(&overlay->mutex); |
|---|
| 385 | 352 | |
|---|
| 386 | 353 | return 0; |
|---|
| 387 | 354 | } |
|---|