Results 1 to 4 of 4

Thread: Kernel

Hybrid View

  1. #1
    Join Date
    Oct 2011
    Location
    Italy
    Posts
    138

    Default Kernel

    Hi
    A simple question.
    The kernel how do you handle a video card radeon??
    In what format he will send the instructions?
    Thanks

  2. #2
    Join Date
    Oct 2007
    Location
    Toronto-ish
    Posts
    7,284

    Default

    The kernel driver can write directly to registers and/or memory on the card. It also handles command packets generated by the userspace drivers and passes them to the hardware after checking the contents. Two types of packets are most commonly used -- type 0 packets are used to write registers from userspace (this is why the kernel driver checks 'em) and type 3 packets tell the chips to perform more complex commands.

    Here's a subset of the commands supported on Evergreen -- dispatch commands are for compute, draw commands for graphics.

    Example taken from : http://cgit.freedesktop.org/~airlied...d.h?h=drm-next

    /* Packet 3 types */
    #define PACKET3_NOP 0x10
    #define PACKET3_SET_BASE 0x11
    #define PACKET3_CLEAR_STATE 0x12
    #define PACKET3_INDEX_BUFFER_SIZE 0x13
    #define PACKET3_DISPATCH_DIRECT 0x15
    #define PACKET3_DISPATCH_INDIRECT 0x16
    #define PACKET3_INDIRECT_BUFFER_END 0x17
    #define PACKET3_MODE_CONTROL 0x18
    #define PACKET3_SET_PREDICATION 0x20
    #define PACKET3_REG_RMW 0x21
    #define PACKET3_COND_EXEC 0x22
    #define PACKET3_PRED_EXEC 0x23
    #define PACKET3_DRAW_INDIRECT 0x24
    #define PACKET3_DRAW_INDEX_INDIRECT 0x25
    For more info about how packets get to the hardware (via a ring buffer in memory that CPU and GPU can both access) take a look at pages 18-20 of :

    http://www.x.org/docs/AMD/R5xx_Acceleration_v1.5.pdf

    Edit -- originally linked to 6xx/7xx 3D doc but the 3xx-5xx doc has more details.
    Last edited by bridgman; 12-11-2012 at 12:02 PM.

  3. #3
    Join Date
    Oct 2011
    Location
    Italy
    Posts
    138

    Default

    Thanks :-)

  4. #4
    Join Date
    Dec 2012
    Posts
    4

    Default

    It also handles command packets generated by the userspace drivers and passes them to the hardware after checking the contents.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •