struct winsys_handle;
struct pipe_screen *panfrost_drm_screen_create(int drmFD);
-struct pipe_screen *panfrost_drm_screen_create_renderonly(int fd,
- struct renderonly *ro,
- const struct pipe_screen_config *config);
-struct renderonly_scanout *panfrost_create_kms_dumb_buffer_for_resource(struct pipe_resource *rsc,
- struct renderonly *ro,
- struct winsys_handle *out_handle);
+struct pipe_screen *
+panfrost_drm_screen_create_renderonly(int fd, struct renderonly *ro,
+ const struct pipe_screen_config *config);
+struct renderonly_scanout *
+panfrost_create_kms_dumb_buffer_for_resource(struct pipe_resource *rsc,
+ struct renderonly *ro,
+ struct winsys_handle *out_handle);
#endif /* __PAN_DRM_PUBLIC_H__ */
*/
#include <errno.h>
-#include <unistd.h>
#include <fcntl.h>
+#include <unistd.h>
#include "util/format/u_format.h"
#include "util/os_file.h"
#include "util/u_screen.h"
#include "drm-uapi/drm.h"
+#include "panfrost/pan_public.h"
#include "renderonly/renderonly.h"
#include "panfrost_drm_public.h"
-#include "panfrost/pan_public.h"
#include "xf86drm.h"
struct renderonly_scanout *
for (unsigned i = 1; i <= blk_sz; i++) {
if (!((64 * i) % blk_sz)) {
align_w = (64 * i) / blk_sz;
- break;
+ break;
}
}
int err = drmIoctl(ro->kms_fd, DRM_IOCTL_MODE_CREATE_DUMB, &create_dumb);
if (err < 0) {
fprintf(stderr, "DRM_IOCTL_MODE_CREATE_DUMB failed: %s\n",
- strerror(errno));
+ strerror(errno));
goto free_scanout;
}
FREE(scanout);
return NULL;
-
}
struct pipe_screen *
}
struct pipe_screen *
-panfrost_drm_screen_create_renderonly(int fd,
- struct renderonly *ro,
+panfrost_drm_screen_create_renderonly(int fd, struct renderonly *ro,
const struct pipe_screen_config *config)
{
- return u_pipe_screen_lookup_or_create(os_dupfd_cloexec(fd), config,
- ro, panfrost_create_screen);
+ return u_pipe_screen_lookup_or_create(os_dupfd_cloexec(fd), config, ro,
+ panfrost_create_screen);
}