From e1e0ae1b7a275f3f741855048f33e9edb01fc91d Mon Sep 17 00:00:00 2001 From: "Sergey Semyonov (Serge)" Date: Mon, 22 Feb 2016 08:52:35 +0000 Subject: [PATCH] ddk: update git-svn-id: svn://kolibrios.org@6282 a494cfbc-eb01-0410-851d-a64ba20cac60 --- drivers/ddk/core.S | 17 +++++++++------- drivers/ddk/linux/firmware.c | 4 ++-- drivers/include/display.h | 31 +++++++++++++++++++++++++---- drivers/include/linux/scatterlist.h | 2 +- 4 files changed, 40 insertions(+), 14 deletions(-) diff --git a/drivers/ddk/core.S b/drivers/ddk/core.S index 6d31da9011..a016261fe8 100644 --- a/drivers/ddk/core.S +++ b/drivers/ddk/core.S @@ -67,8 +67,10 @@ .global _RegService - .global _SetMouseData + .global _SetFramebuffer + .global _SetKeyboardData + .global _SetMouseData .global _SetScreen .global _SysMsgBoardStr @@ -148,9 +150,10 @@ .def _RegService; .scl 2; .type 32; .endef - .def _SetScreen; .scl 2; .type 32; .endef - .def _SetMouseData; .scl 2; .type 32; .endef + .def _SetFramebuffer; .scl 2; .type 32; .endef .def _SetKeyboardData; .scl 2; .type 32; .endef + .def _SetMouseData; .scl 2; .type 32; .endef + .def _SetScreen; .scl 2; .type 32; .endef .def _SysMsgBoardStr; .scl 2; .type 32; .endef .def _TimerHS; .scl 2; .type 32; .endef @@ -226,9 +229,9 @@ _PciWrite8: _RaiseEvent: _RegService: -_SetMouseData: +_SetFramebuffer: _SetKeyboardData: - +_SetMouseData: _SetScreen: _SysMsgBoardStr: @@ -307,9 +310,9 @@ _WaitEventTimeout: .ascii " -export:RegService" # stdcall - .ascii " -export:SetMouseData" # stdcall + .ascii " -export:SetFramebuffer" # fastcall .ascii " -export:SetKeyboardData" # stdcall - + .ascii " -export:SetMouseData" # stdcall .ascii " -export:SetScreen" # stdcall .ascii " -export:SysMsgBoardStr" # stdcall diff --git a/drivers/ddk/linux/firmware.c b/drivers/ddk/linux/firmware.c index d2833816c2..cc381907f1 100644 --- a/drivers/ddk/linux/firmware.c +++ b/drivers/ddk/linux/firmware.c @@ -110,7 +110,7 @@ release_firmware(const struct firmware *fw) kfree((void*)fw); } } - +/* struct platform_device* platform_device_register_simple(const char* c, int id, void *r, unsigned int i) { @@ -118,5 +118,5 @@ platform_device_register_simple(const char* c, int id, void *r, unsigned int i) return &pd; }; - +*/ diff --git a/drivers/include/display.h b/drivers/include/display.h index 671c3f2531..896cdf6c19 100644 --- a/drivers/include/display.h +++ b/drivers/include/display.h @@ -1,6 +1,15 @@ - +typedef struct tag_object kobj_t; typedef struct tag_display display_t; +struct tag_object +{ + uint32_t magic; + void *destroy; + kobj_t *fd; + kobj_t *bk; + uint32_t pid; +}; + typedef struct { kobj_t header; @@ -16,6 +25,21 @@ typedef struct #define KMS_CURSOR_WIDTH 64 #define KMS_CURSOR_HEIGHT 64 +struct kos_framebuffer +{ + struct list_head list; + uint32_t magic; + uint32_t handle; + void *destructor; + + uint32_t width; + uint32_t height; + uint32_t pitch; + uint32_t format; + void *private; + uint32_t pde[8]; +}; + struct tag_display { u32 x; @@ -24,7 +48,7 @@ struct tag_display u32 height; u32 bpp; u32 vrefresh; - void *lfb; + struct kos_framebuffer *current_lfb; u32 lfb_pitch; struct rw_semaphore win_map_lock; @@ -55,5 +79,4 @@ struct tag_display extern display_t *os_display; -int init_cursor(cursor_t *cursor); -void __stdcall restore_cursor(int x, int y); + diff --git a/drivers/include/linux/scatterlist.h b/drivers/include/linux/scatterlist.h index 494afd84c6..9c393eb9e0 100644 --- a/drivers/include/linux/scatterlist.h +++ b/drivers/include/linux/scatterlist.h @@ -282,7 +282,7 @@ size_t sg_pcopy_to_buffer(struct scatterlist *sgl, unsigned int nents, * Maximum number of entries that will be allocated in one piece, if * a list larger than this is required then chaining will be utilized. */ -#define SG_MAX_SINGLE_ALLOC (4*PAGE_SIZE / sizeof(struct scatterlist)) +#define SG_MAX_SINGLE_ALLOC (8*PAGE_SIZE / sizeof(struct scatterlist)) /* * sg page iterator