Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 8e4a408 in mainline


Ignore:
Timestamp:
2014-07-09T23:25:28Z (6 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master
Children:
c1b979a
Parents:
7d276395
Message:

Visualizer should use a custom connection handler instead of a single-method devman interface. This fixes rfb, which was broken.

Location:
uspace
Files:
4 deleted
8 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/fb/amdm37x_dispc/amdm37x_dispc.c

    r7d276395 r8e4a408  
    3434 */
    3535
     36#include <align.h>
    3637#include <assert.h>
    3738#include <errno.h>
  • uspace/drv/fb/amdm37x_dispc/main.c

    r7d276395 r8e4a408  
    3535 */
    3636
     37#include <ddf/driver.h>
    3738#include <ddf/log.h>
    3839#include <errno.h>
    3940#include <str_error.h>
    4041#include <stdio.h>
    41 #include <ops/graph_dev.h>
    4242#include <graph.h>
    4343
     
    4646#define NAME  "amdm37x_dispc"
    4747
    48 static graph_dev_ops_t graph_vsl_dev_ops = {
    49         .connect = (connect_func) &graph_visualizer_connection
    50 };
     48static void graph_vsl_connection(ipc_callid_t iid, ipc_call_t *icall, void *arg)
     49{
     50        visualizer_t *vsl;
    5151
    52 static ddf_dev_ops_t graph_fun_ops = {
    53         .interfaces[GRAPH_DEV_IFACE] = &graph_vsl_dev_ops
    54 };
     52        vsl = (visualizer_t *) ddf_fun_data_get((ddf_fun_t *)arg);
     53        graph_visualizer_connection(vsl, iid, icall, NULL);
     54}
    5555
    5656static int amdm37x_dispc_dev_add(ddf_dev_t *dev)
     
    7474        vis->reg_svc_handle = ddf_fun_get_handle(fun);
    7575
    76         ddf_fun_set_ops(fun, &graph_fun_ops);
     76        ddf_fun_set_conn_handler(fun, graph_vsl_connection);
    7777        /* Hw part */
    7878        amdm37x_dispc_t *dispc =
  • uspace/drv/fb/kfb/kfb.c

    r7d276395 r8e4a408  
    4040#include <task.h>
    4141#include <graph.h>
    42 #include <ops/graph_dev.h>
    4342#include "port.h"
    4443#include "kfb.h"
     
    6059};
    6160
    62 static graph_dev_ops_t graph_vsl_dev_ops = {
    63         .connect = (connect_func) &graph_visualizer_connection
    64 };
    65 
    66 ddf_dev_ops_t graph_vsl_device_ops = {
    67         .interfaces[GRAPH_DEV_IFACE] = &graph_vsl_dev_ops
    68 };
    69 
    70 static graph_dev_ops_t graph_rnd_dev_ops = {
    71         .connect = (connect_func) &graph_renderer_connection
    72 };
    73 
    74 ddf_dev_ops_t graph_rnd_device_ops = {
    75         .interfaces[GRAPH_DEV_IFACE] = &graph_rnd_dev_ops
    76 };
    77 
    7861int main(int argc, char *argv[])
    7962{
  • uspace/drv/fb/kfb/port.c

    r7d276395 r8e4a408  
    207207};
    208208
     209static void graph_vsl_connection(ipc_callid_t iid, ipc_call_t *icall, void *arg)
     210{
     211        visualizer_t *vsl;
     212
     213        vsl = (visualizer_t *) ddf_fun_data_get((ddf_fun_t *)arg);
     214        graph_visualizer_connection(vsl, iid, icall, NULL);
     215}
     216
    209217int port_init(ddf_dev_t *dev)
    210218{
     
    346354                return ENOMEM;
    347355        }
    348         ddf_fun_set_ops(fun_vs, &graph_vsl_device_ops);
     356        ddf_fun_set_conn_handler(fun_vs, &graph_vsl_connection);
    349357
    350358        visualizer_t *vs = ddf_fun_data_alloc(fun_vs, sizeof(visualizer_t));
  • uspace/lib/c/include/ipc/dev_iface.h

    r7d276395 r8e4a408  
    4040        /** Character device interface */
    4141        CHAR_DEV_IFACE,
    42 
    43         /** Graphic device interface */
    44         GRAPH_DEV_IFACE,
    4542
    4643        /** Audio device mixer interface */
  • uspace/lib/drv/Makefile

    r7d276395 r8e4a408  
    4747        generic/remote_pio_window.c \
    4848        generic/remote_char_dev.c \
    49         generic/remote_graph_dev.c \
    5049        generic/remote_nic.c \
    5150        generic/remote_usb.c \
  • uspace/lib/drv/generic/dev_iface.c

    r7d276395 r8e4a408  
    4545#include "remote_led_dev.h"
    4646#include "remote_battery_dev.h"
    47 #include "remote_graph_dev.h"
    4847#include "remote_nic.h"
    4948#include "remote_usb.h"
     
    6261                [PIO_WINDOW_DEV_IFACE] = &remote_pio_window_iface,
    6362                [CHAR_DEV_IFACE] = &remote_char_dev_iface,
    64                 [GRAPH_DEV_IFACE] = &remote_graph_dev_iface,
    6563                [NIC_DEV_IFACE] = &remote_nic_iface,
    6664                [PCI_DEV_IFACE] = &remote_pci_iface,
  • uspace/srv/hid/compositor/compositor.c

    r7d276395 r8e4a408  
    5757
    5858#include <event.h>
    59 #include <graph_iface.h>
    6059#include <io/keycode.h>
    6160#include <io/mode.h>
     
    11561155        if (sess == NULL) {
    11571156                printf("%s: Unable to connect to visualizer %s\n", NAME, svc);
    1158                 return NULL;
    1159         }
    1160 
    1161         rc = graph_dev_connect(sess);
    1162         if (rc != EOK) {
    1163                 printf("%s: Failed initializing visualiser %s\n", NAME, svc);
    11641157                return NULL;
    11651158        }
Note: See TracChangeset for help on using the changeset viewer.